Codebase list rust-libslirp / cfc28ae
vars.sh: Fix issue when .git/hooks does not exist Nicolas Braud-Santoni 5 years ago
1 changed file(s) with 1 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22
33 abort() { local x=$1; shift; for i in "$@"; do echo >&2 "$0: abort: $i"; done; exit "$x"; }
44
5 mkdir -p "$(dirname "$0")/.git/hooks"
56 HOOK_COMMIT="$(dirname "$0")/.git/hooks/pre-commit"
67 if [ ! -x "$HOOK_COMMIT" ]; then
78 cat <<'eof' >"$HOOK_COMMIT"