Tweak updater script

This commit is contained in:
Nathan McCarty 2023-05-15 22:41:47 -04:00
parent ffee83c7c5
commit c1b048b96b
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 8 additions and 10 deletions

View File

@ -4,17 +4,15 @@ set -exou pipefail
TEMP_DIR=$(mktemp -d "repo-updater.XXXX" -p $XDG_RUNTIME_DIR)
pushd $TEMP_DIR
git clone "$1" repo
pushd repo
git switch $2
./update.sh
git add -A
if git commit -m "Update flake/dependencies"; then
if git clone "$1" repo && pushd repo && git switch $2 && ./update.sh; then
git add -A
if git commit S -m "Update flake/dependencies"; then
git push -u origin $2
else
else
echo "No changes made"
fi
else
echo "Update failed"
fi
popd