fixer upper and remove a user prompt in the middle of setup

This commit is contained in:
Wryn (yage) Wagner 2023-11-19 12:00:51 -07:00
parent ad338c15c5
commit c20d85e1d0
6 changed files with 22 additions and 21 deletions

View File

@ -10,6 +10,10 @@ VUNDLE__BUILD__nerdtree() {
# ... build steps from /home/w0ryn/.vim/nerdtree
}
VUNDLE__BUILD__unicode.vim() {
# ... build steps from /home/w0ryn/.vim/unicode.vim
}
VUNDLE__BUILD__vim-dim() {
# ... build steps from /home/w0ryn/.vim/vim-dim
}

View File

@ -1,11 +0,0 @@
yN 'keep logfile?' || {
rm "$LOGFILE" \
|| ERROR "unable to remote '$LOGFILE'" \
;
}
SUCCESS '
.wryn setup complete; have a nice day :)
'
exit 0

View File

@ -36,8 +36,6 @@ CONFIG__VIM() {
CONFIG__ENV vim || return 1
CONFIG__RC vim || return 2
[ $COMPILE_VIM ] && [[ $COMPILE_VIM -eq 1 ]] && return 0
STATUS 'starting vim setup'
SCWRYPTS --name system/vim/vundle/install --group scwrypts --type zsh || return 1
}
@ -49,11 +47,15 @@ CONFIG__ENV() {
local LOCAL_CONFIG="$HOME/.config/wryn/env.$1"
[ -f $LOCAL_CONFIG ] && {
case $OVERWRITE_EXISTING in
0 ) return 0 ;;
1 )
WARNING "local $1 configuration exists ($LOCAL_CONFIG)"
yN 'overwrite this configuration?' || return 0
mv "$LOCAL_CONFIG" "$LOCAL_CONFIG.bak" >/dev/null 2>&1 \
&& INFO "created backup of local configuration ($LOCAL_CONFIG.bak)"
esac
}
STATUS "setting up $1 configuration ($LOCAL_CONFIG)"
@ -72,7 +74,7 @@ CONFIG__ENV() {
|| FAIL 1 "unable to create $1 configuration" \
;
EDIT "$LOCAL_CONFIG"
EDITOR=vim VISUAL=vim EDIT "$LOCAL_CONFIG"
}

View File

@ -6,6 +6,7 @@ cowsay
figlet
fzf
htop
jq
lolcat
ncurses
python

View File

@ -14,6 +14,7 @@ i3-wm
i3lock-color
i3status
jdk-openjdk
jq
lolcat
monaspace-font
mono

View File

@ -1,17 +1,18 @@
#!/bin/zsh
cd "${0:a:h}"
OVERWRITE_EXISTING=0
while [[ $# -gt 0 ]]
do
case $1 in
--force-root ) FORCE_ROOT=1 ;;
--ci ) export CI=1 ;;
--overwrite ) OVERWRITE_EXISTING=1 ;;
--no-compile-dmenu ) COMPILE_DMENU=0 ;;
--no-compile-vim ) COMPILE_VIM=0 ;;
--min )
MIN=1
COMPILE_VIM=0
COMPILE_DMENU=0
;;
esac
@ -32,4 +33,7 @@ INFO "installation start : $(date)" 2>> "$LOGFILE"
INFO "installation complete: $(date)" 2>> "$LOGFILE"
################################################################################
source "$DOTWRYN_PATH/setup/cleanup.zsh"
yN 'keep logfile?' \
|| { rm "$LOGFILE" || ERROR "unable to remove '$LOGFILE'" }
SUCCESS "\n.wryn setup complete; have a nice day :)\n"