commit 5f253f6a4727b31242cd5998f1b3326cc9e7ed33 Author: rl1987 rl1987@sdf.lonestar.org Date: Wed Mar 6 19:53:50 2019 +0200
Iterate over contents of scripts/git with check_for_script_update function --- scripts/git/post-merge.git-hook | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/scripts/git/post-merge.git-hook b/scripts/git/post-merge.git-hook index 300684a9b..ed0e16279 100755 --- a/scripts/git/post-merge.git-hook +++ b/scripts/git/post-merge.git-hook @@ -12,7 +12,7 @@ git_toplevel=$(git rev-parse --show-toplevel)
check_for_diffs() { installed="$git_toplevel/.git/hooks/$1" - latest="$git_toplevel/scripts/maint/$1.git-hook" + latest="$git_toplevel/scripts/git/$1.git-hook"
if [ -e "$installed" ] then @@ -26,7 +26,7 @@ check_for_diffs() { }
check_for_script_update() { - fullpath="$git_toplevel/scripts/maint/$1" + fullpath="$1"
if ! git diff ORIG_HEAD HEAD --exit-code -- "$fullpath" >/dev/null then @@ -39,6 +39,7 @@ check_for_diffs "pre-push" check_for_diffs "pre-commit" check_for_diffs "post-merge"
-check_for_script_update "git-merge-forward.sh" -check_for_script_update "git-pull-all.sh" -check_for_script_update "git-push-all.sh" +for file in "$git_toplevel"/scripts/git/* ; do + check_for_script_update "$file" +done +