Make hello loop through an array, make bye juste use git-summary

This commit is contained in:
flyingscorpio@arch-desktop 2020-10-27 12:43:24 +01:00
parent fc00e84474
commit 2be447b3c0

View file

@ -48,32 +48,31 @@ clitip() {
xmlstarlet unesc | fmt -80 | iconv -t US xmlstarlet unesc | fmt -80 | iconv -t US
} }
GIT_REPOS=(~/SetupCockpit ~/Keepass ~/Lessons/* ~/PersonalScripts ~/RootMe ~/SRC/*)
hello() { hello() {
start_dir="$PWD"
sudo protonvpn c -f sudo protonvpn c -f
echo echo
# Don't update if its a kernel update that will require reboot # Don't update if its a kernel update that will require reboot
case "$(checkupdates)" in if checkupdates; then
*linux*) case "$(checkupdates)" in
echo "Not performing update" *linux*)
;; echo "Not performing update"
*) ;;
sudo pacman -Syu *)
esac sudo pacman -Syu
echo "Pulling from SetupCockpit" esac
cd ~/SetupCockpit && git pull fi
echo "Pulling from Keepass"
cd ~/Keepass && git pull for repo in "${GIT_REPOS[@]}"; do
echo "Pulling from TSSR" echo "Pulling from $repo..."
cd ~/Lessons/TSSR && git pull cd "$repo" && git pull
cd || exit 1 done
cd "$start_dir" || exit 1
} }
bye() { bye() {
echo "Pushing to SetupCockpit"
cd ~/SetupCockpit && git push
echo "Pushing to Keepass"
cd ~/Keepass && git push
echo "Pushing to TSSR"
cd ~/Lessons/TSSR && git push
cd || exit 1 cd || exit 1
git-summary -d
} }