mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-11-13 07:31:15 +01:00
Now ensures the user has required binaries before trying to set git hook.
This commit is contained in:
parent
3800e24870
commit
2ca918fd2f
1 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
check_command() {
|
||||
command -v "$1" > /dev/null 2>&1 || { echo "git-stats hook script requires the \`${1}\` binary in order to run." >&2; exit 1; }
|
||||
}
|
||||
|
||||
check_command "perl"
|
||||
check_command "printf"
|
||||
check_command "git"
|
||||
|
||||
echo "Setting up git-stats hooks.";
|
||||
|
||||
git_templates_dir=$(git config --global --get init.templatedir);
|
||||
|
|
Loading…
Reference in a new issue