diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-04-20 13:02:02 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-04-20 20:11:13 +0200 |
commit | 3b6fd3c1dea070cb1882b8810e18a45158a356f2 (patch) | |
tree | 1a42abd78e9acf4cf528c6e0e8998652c87ede9d /tools/add-git-hook.sh | |
parent | 437e889b18743ea4d594521829e43b6067ce9036 (diff) | |
download | systemd-3b6fd3c1dea070cb1882b8810e18a45158a356f2.tar.gz |
tools: shellcheck-ify most of the tool scripts
Diffstat (limited to 'tools/add-git-hook.sh')
-rwxr-xr-x | tools/add-git-hook.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/add-git-hook.sh b/tools/add-git-hook.sh index 66bbcd64ea..8cff62e864 100755 --- a/tools/add-git-hook.sh +++ b/tools/add-git-hook.sh @@ -2,9 +2,9 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -eu -cd "$MESON_SOURCE_ROOT" +cd "${MESON_SOURCE_ROOT:?}" -if [ ! -f .git/hooks/pre-commit.sample -o -f .git/hooks/pre-commit ]; then +if [ ! -f .git/hooks/pre-commit.sample ] || [ -f .git/hooks/pre-commit ]; then exit 2 # not needed fi |