From 1495f18118711f8fdcc38f469f890b677c1873ff Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 28 Jul 2023 21:30:48 -0400 Subject: Fix tags generation in git hook --- Biz/Ide/hooks/post-checkout | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Biz/Ide/hooks/post-checkout b/Biz/Ide/hooks/post-checkout index 9328c35..3eac0b9 100755 --- a/Biz/Ide/hooks/post-checkout +++ b/Biz/Ide/hooks/post-checkout @@ -1,14 +1,14 @@ #!/usr/bin/env bash set -e -init_tags=${BIZ_ROOT:?}/Biz/Ide/init_tags.sh +mktags=${BIZ_ROOT:?}/Biz/Ide/mktags old=$1 new=$2 # filter out only the changed haskell files changed=($(git diff --diff-filter=d --name-only $old $new -- '*.hs')) -if [[ ! -r tags ]] +if [[ ! -r tags ]] || [[ ! -r TAGS ]] then - $init_tags + $mktags "$BIZ_ROOT"/**/* elif [[ ${#changed[@]} -gt 0 ]] then - $init_tags $changed + $mktags $changed fi -- cgit v1.2.3