diff --git a/install.sh b/install.sh index b3b1338..319e8ae 100755 --- a/install.sh +++ b/install.sh @@ -17,7 +17,7 @@ elif [ "$(lsb_release -si)" = "Artix" ]; then set -- "alacritty" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh" else echo "OS not supported!" - exit 2 + exit 1 fi sleep 0.5 @@ -26,8 +26,11 @@ echo "=> Installing dotfile packages..." for pkg in "$@"; do sleep 0.1 echo " -> Stowing $pkg" + + # Symlink only the individual files instead of the entire directory + [ "$pkg" = "zsh" ] && mkdir -p "$HOME/.config/$pkg" + [ "$pkg" = "scripts" ] && mkdir -p "$HOME/.local/bin" - [ "$pkg" = "zsh" ] && mkdir -p "$HOME/.config/$pkg" # Symlink only the individual files instead of the entire directory stow -t "$HOME" --ignore="README.md" "$pkg" done diff --git a/scripts/.local/bin/update.sh b/scripts/.local/bin/update.sh index 8e7223c..4fea341 100755 --- a/scripts/.local/bin/update.sh +++ b/scripts/.local/bin/update.sh @@ -18,3 +18,9 @@ fi command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; } || true command -v docker >/dev/null 2>&1 && { echo; docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}' | xargs -l docker pull; } || true command -v npm >/dev/null 2>&1 && { echo; npm up -g; } || true +command -v nvim >/dev/null 2>&1 && { echo; nvim --headless +PlugUpdate +PlugUpgrade +qa; echo; } || true + +echo + +DOTDIR="$(dirname $(readlink -e $0))" +zsh -ic "git -C $DOTDIR pull && antidote update && fg"