Tweak updater script
This commit is contained in:
parent
8f64710826
commit
b18d67a386
|
@ -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
|
||||
git push -u origin $2
|
||||
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
|
||||
echo "No changes made"
|
||||
fi
|
||||
else
|
||||
echo "No changes made"
|
||||
echo "Update failed"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
|
Loading…
Reference in New Issue