From 53b139315df3ec5622a704bc460c7b360ddf687d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 21 Jun 2020 19:36:10 +0200 Subject: Questions over questions... --- sync | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'sync') diff --git a/sync b/sync index 4a7d01c..2ccf77b 100755 --- a/sync +++ b/sync @@ -31,19 +31,23 @@ echo "Syncing packages" sudo pacman -Syq &>/dev/null printf "\033[0;34m" -echo "Comparing installed packages" -comm -23 <(sort packages.txt) <(pacman -Qqe | sort) | yay -Sq --needed - - -printf "\033[0;34m" -echo "Compiling local repos" -for d in ./.repos/*/; do (cd "$d" && sudo make clean install &>/dev/null); done || exit 1 +read -p "Do you want to install the packages? [yn] " -n 1 -r +if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Comparing installed packages" + comm -23 <(sort packages.txt) <(pacman -Qqe | sort) | yay -Sq --needed - +fi +echo printf "\033[0;34m" echo "Copying configs" printf "\033[0;37m" -cp -rv .config/ .local/ .lein/ .scripts/ .boilerplates/ .bash_profile .bashrc .xinitrc .Xresources "$HOME"/ +cp -rv .config/ .local/ .lein/ .scripts/ .boilerplates/ .repos/ .bash_profile .bashrc .xinitrc .Xresources "$HOME"/ sudo cp -rv .etc/* /etc/ +printf "\033[0;34m" +echo "Compiling local repos" +for d in "$HOME"/.repos/*/; do (cd "$d" && sudo make clean install &>/dev/null); done || exit 1 + printf "\033[0;34m" echo "Syncing crypto files from server" ping -q -w1 -c1 10.0.0.33 &>/dev/null && -- cgit v1.2.3