Tweak updater script
This commit is contained in:
parent
ffee83c7c5
commit
c1b048b96b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue