diff --git a/dotfiles/shell/aliases b/dotfiles/shell/aliases index 9c4c622..1000a8d 100644 --- a/dotfiles/shell/aliases +++ b/dotfiles/shell/aliases @@ -60,7 +60,7 @@ clitip() { xmlstarlet unesc | fmt -80 | iconv -t US } -GIT_REPOS=(~/.password-store ~/SetupCockpit ~/Keepass ~/Lessons/* ~/PersonalScripts ~/RootMe ~/SRC/*) +GIT_REPOS=(~/.password-store ~/SetupCockpit ~/Keepass ~/TSSR ~/Lessons/* ~/PersonalScripts ~/RootMe ~/SRC/*) cockpit() { # enable pass-like commands (ex: cockpit git push) local start_dir="$PWD" @@ -68,10 +68,7 @@ cockpit() { # enable pass-like commands (ex: cockpit git push) cd "$start_dir" && echo 'done' } -hello() { - local start_dir="$PWD" - sudo protonvpn c -f - echo +system_update() { # Don't update if its a kernel update that will require reboot if checkupdates >/dev/null 2>&1; then case "$(checkupdates | grep linux && echo)" in @@ -82,7 +79,10 @@ hello() { sudo pacman -Syu esac fi +} +pull_from_repos() { + local start_dir="$PWD" for repo in "${GIT_REPOS[@]}"; do echo "Pulling from $repo..." cd "$repo" && git pull @@ -90,6 +90,22 @@ hello() { cd "$start_dir" || exit 1 } +hello() { + sudo protonvpn c -f + system_update + + echo -n "Do you want to pull from you git repos? [y/N] " + local answer + read -r answer + case "$answer" in + y) + pull_from_repos + ;; + *) + echo "Not pulling from git repos." + esac +} + bye() { cd || exit 1 git-summary -d