update update
This commit is contained in:
parent
a57e1c9684
commit
677ce92bf8
1 changed files with 8 additions and 2 deletions
10
update
10
update
|
@ -11,7 +11,6 @@ update() {
|
||||||
|
|
||||||
if [ ${status} -ne 0 ]; then
|
if [ ${status} -ne 0 ]; then
|
||||||
echo "Failed to get pad at ${url}"
|
echo "Failed to get pad at ${url}"
|
||||||
exit ${status}
|
|
||||||
else
|
else
|
||||||
git -C "${gitdir}" add "${dst}"
|
git -C "${gitdir}" add "${dst}"
|
||||||
changes=$(git -C "${gitdir}" diff --cached | wc -l)
|
changes=$(git -C "${gitdir}" diff --cached | wc -l)
|
||||||
|
@ -25,6 +24,13 @@ update() {
|
||||||
git -C "${gitdir}" reset --hard HEAD
|
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"
|
update "$pad"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue