Make hello loop through an array, make bye juste use git-summary
This commit is contained in:
parent
fc00e84474
commit
2be447b3c0
1 changed files with 19 additions and 20 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue