Files
zulip/tools/setup-git-repo
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00

13 lines
286 B
Bash
Executable File

#!/usr/bin/env bash
if ! [ -d ".git/hooks/" ]; then
echo "Error: Could not find .git/hooks directory"
echo "Please re-run this script from the root of your zulip.git checkout"
exit 1
fi
for hook in pre-commit commit-msg
do
ln -snf ../../tools/"$hook" .git/hooks/
done