update update

This commit is contained in:
Tim Schubert 2022-04-19 20:15:43 +02:00
parent a57e1c9684
commit 677ce92bf8
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA

10
update
View file

@ -11,7 +11,6 @@ update() {
if [ ${status} -ne 0 ]; then
echo "Failed to get pad at ${url}"
exit ${status}
else
git -C "${gitdir}" add "${dst}"
changes=$(git -C "${gitdir}" diff --cached | wc -l)
@ -25,6 +24,13 @@ update() {
git -C "${gitdir}" reset --hard HEAD
}
while read -r pad; do
if ! git rev-parse --is-inside-work-tree
then
echo "Not a working directory"
exit 1
fi
while read -r pad
do
update "$pad"
done