diff --git a/dotfiles/shell/aliases b/dotfiles/shell/aliases index 59bc715..70a500d 100644 --- a/dotfiles/shell/aliases +++ b/dotfiles/shell/aliases @@ -48,32 +48,31 @@ clitip() { xmlstarlet unesc | fmt -80 | iconv -t US } +GIT_REPOS=(~/SetupCockpit ~/Keepass ~/Lessons/* ~/PersonalScripts ~/RootMe ~/SRC/*) + hello() { + start_dir="$PWD" sudo protonvpn c -f echo # Don't update if its a kernel update that will require reboot - case "$(checkupdates)" in - *linux*) - echo "Not performing update" - ;; - *) - sudo pacman -Syu - esac - echo "Pulling from SetupCockpit" - cd ~/SetupCockpit && git pull - echo "Pulling from Keepass" - cd ~/Keepass && git pull - echo "Pulling from TSSR" - cd ~/Lessons/TSSR && git pull - cd || exit 1 + if checkupdates; then + case "$(checkupdates)" in + *linux*) + echo "Not performing update" + ;; + *) + sudo pacman -Syu + esac + fi + + for repo in "${GIT_REPOS[@]}"; do + echo "Pulling from $repo..." + cd "$repo" && git pull + done + cd "$start_dir" || exit 1 } 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 + git-summary -d }