From cd6f38a2e8d5b2f4198831aae0a37c568c69c2ae Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 8 Aug 2022 10:01:32 -0400 Subject: Ensure BIZ_ROOT is set in shell scripts --- Biz/Ide/hooks/post-checkout | 2 +- Biz/Ide/hooks/post-merge | 2 +- Biz/Ide/hooks/pre-commit | 2 +- Biz/Ide/hooks/pre-push | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Biz/Ide/hooks') diff --git a/Biz/Ide/hooks/post-checkout b/Biz/Ide/hooks/post-checkout index 95b35cd..9328c35 100755 --- a/Biz/Ide/hooks/post-checkout +++ b/Biz/Ide/hooks/post-checkout @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -init_tags=$BIZ_ROOT/Biz/Ide/init_tags.sh +init_tags=${BIZ_ROOT:?}/Biz/Ide/init_tags.sh old=$1 new=$2 # filter out only the changed haskell files diff --git a/Biz/Ide/hooks/post-merge b/Biz/Ide/hooks/post-merge index 624e797..8aa530e 100755 --- a/Biz/Ide/hooks/post-merge +++ b/Biz/Ide/hooks/post-merge @@ -1,2 +1,2 @@ #!/usr/bin/env bash -exec $BIZ_ROOT/Biz/Ide/post-checkout 'HEAD@{1}' HEAD +exec ${BIZ_ROOT:?}/Biz/Ide/post-checkout 'HEAD@{1}' HEAD diff --git a/Biz/Ide/hooks/pre-commit b/Biz/Ide/hooks/pre-commit index fe4bbe3..065a0f6 100755 --- a/Biz/Ide/hooks/pre-commit +++ b/Biz/Ide/hooks/pre-commit @@ -7,7 +7,7 @@ changed=($(git diff-index --cached --name-only HEAD)) for ns in ${changed[@]} do - version=$($BIZ_ROOT/Biz/Ide/version $ns) + version=$(${BIZ_ROOT:?}/Biz/Ide/version $ns) if (( $version == -1 )); then echo "info: version: $ns: deleted" elif (( $version < 1 )); then diff --git a/Biz/Ide/hooks/pre-push b/Biz/Ide/hooks/pre-push index 5236651..c27046d 100755 --- a/Biz/Ide/hooks/pre-push +++ b/Biz/Ide/hooks/pre-push @@ -1,2 +1,2 @@ #!/usr/bin/env bash -lint "$BIZ_ROOT"/**/* && bild --test "$BIZ_ROOT"/**/* +lint "${BIZ_ROOT:?}"/**/* && bild --test "${BIZ_ROOT:?}"/**/* -- cgit v1.2.3