fix dev/git-add.sh

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-05-02 15:16:49 +02:00
parent 8ea9e3b158
commit 9a62de536f

View File

@ -3,14 +3,14 @@
#
# works together with git pre-push.sh and ADD all changed files since last push
#### $$VERSION$$ v0.70-0-g6243be9
#### $$VERSION$$ v0.80-dev-3-g9bcab66
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script
GIT_DIR=$(git rev-parse --git-dir)
cd "$GIT_DIR/.." || exit 1
[ -f .git/.lastpush ] || echo "No push or hooks not installed, use \"git add\" instead ... Abort" && exit
[ ! -f .git/.lastpush ] && echo "No push or hooks not installed, use \"git add\" instead ... Abort" && exit
FILES="$(find ./* -newer .git/.lastpush)"
[ "${FILES}" = "" ] && echo "Noting changed since last push ... Abort" && exit