From 3287af51045c67f527eac1f2bb3dd89f255186af Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sun, 15 May 2022 01:36:38 -0700 Subject: [PATCH] add upd: update stuff specified in an env variable and check for dotfiles updates --- .config/shell/bin/upd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 .config/shell/bin/upd diff --git a/.config/shell/bin/upd b/.config/shell/bin/upd new file mode 100755 index 0000000..c37ff35 --- /dev/null +++ b/.config/shell/bin/upd @@ -0,0 +1,17 @@ +#!/bin/bash + +# Check for updates for thing in the REPOS_TO_UPDATE variable +IFS=: read -ra REPOS_TO_UPDATE_ARR <<< "$REPOS_TO_UPDATE" +for REPO in "${REPOS_TO_UPDATE_ARR[@]}"; do + tput setaf 2 + echo " Pulling ${REPO/$HOME/"~"}‥" + tput sgr0 + git -C "$REPO" pull +done + +# check for dotfiles updates +echo +tput setaf 2 +echo " Checking for dotfiles updates‥" +tput sgr0 +dotfiles pull