mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-29 05:02:46 +00:00
add check if hooks installed
This commit is contained in:
parent
7c112122e8
commit
bcbff7f865
@ -10,8 +10,10 @@
|
||||
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
|
||||
|
||||
FILES="$(find ./* -newer .git/.lastpush)"
|
||||
[ "${FILES}" = "" ] && echo "Noting changed since last push!" && exit
|
||||
[ "${FILES}" = "" ] && echo "Noting changed since last push ... Abort" && exit
|
||||
|
||||
# run pre_commit on files
|
||||
dev/hooks/pre-commit.sh
|
||||
|
Loading…
Reference in New Issue
Block a user