Move committing out into other script

This commit is contained in:
Luke Murphy 2020-11-04 01:53:33 +01:00
parent f8c6e84062
commit 855c6fbc4b
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 11 additions and 2 deletions

11
scripts/commit.sh Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Usage: ./commit.sh
for d in $(ls "$HOME/.abra/apps/"); do
cd "$HOME/.abra/apps/$d"
if ! git diff --quiet --exit-code; then
git commit -m "gardening commit"
git push origin $(git branch --quiet | cut -d' ' -f2-)
fi
done

View File

@ -31,7 +31,5 @@ for d in $(ls "$HOME/.abra/apps/"); do
* ) continue;;
esac
git add -p
git commit -m "Gardening: s/$SEARCH_PATTERN/$REPLACE_PATTERN/g"
git push origin $(git branch --quiet | cut -d' ' -f2-)
fi
done