Loading Makefile.am +4 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,10 @@ SUBDIRS = hook-scripts .bindir/git-hooks: git-hooks | .bindir sed 's|LIBDIR=.*|LIBDIR=$(pkgdatadir)|' $< > $@ sed \ -e 's|LIBDIR=.*|LIBDIR="$(pkgdatadir)"|' \ -e 's|HOOKDIR=.*|HOOKDIR="$(pkgdatadir)"|' \ $< > $@ .bindir: $(mkdir_p) .bindir git-hooks +12 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,10 @@ set -e # LIBDIR is populated by the install script # LIBDIR & HOOKDIR are populated by the install script LIBDIR=`readlink -f $(dirname $0)` HOOKDIR="$LIBDIR/hook-scripts" source $LIBDIR/string_functions source $LIBDIR/arg_parse_functions Loading Loading @@ -114,12 +116,19 @@ cmd_add () _basic_check "$@" _change_check "$@" [ -e "$script" ] || die "unknown script '$script'" [ -e "$GIT_DIR"/hooks/$hook.d/"`basename "$script"`" ] && \ die "the script '`basename "$script"`' (or one with the same name) \ already exists in the '$hook' hook directory" if [ -e "$script" ]; then echo "copying $script" cp "$script" "$GIT_DIR"/hooks/$hook.d elif [ -e "$HOOKDIR/$hook/$script" ]; then echo "linking $script from $HOOKDIR/$hook" ln -s "$HOOKDIR/$hook/$script" "$GIT_DIR"/hooks/$hook.d else die "unknown script '$script'" fi } cmd_remove () Loading Loading
Makefile.am +4 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,10 @@ SUBDIRS = hook-scripts .bindir/git-hooks: git-hooks | .bindir sed 's|LIBDIR=.*|LIBDIR=$(pkgdatadir)|' $< > $@ sed \ -e 's|LIBDIR=.*|LIBDIR="$(pkgdatadir)"|' \ -e 's|HOOKDIR=.*|HOOKDIR="$(pkgdatadir)"|' \ $< > $@ .bindir: $(mkdir_p) .bindir
git-hooks +12 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,10 @@ set -e # LIBDIR is populated by the install script # LIBDIR & HOOKDIR are populated by the install script LIBDIR=`readlink -f $(dirname $0)` HOOKDIR="$LIBDIR/hook-scripts" source $LIBDIR/string_functions source $LIBDIR/arg_parse_functions Loading Loading @@ -114,12 +116,19 @@ cmd_add () _basic_check "$@" _change_check "$@" [ -e "$script" ] || die "unknown script '$script'" [ -e "$GIT_DIR"/hooks/$hook.d/"`basename "$script"`" ] && \ die "the script '`basename "$script"`' (or one with the same name) \ already exists in the '$hook' hook directory" if [ -e "$script" ]; then echo "copying $script" cp "$script" "$GIT_DIR"/hooks/$hook.d elif [ -e "$HOOKDIR/$hook/$script" ]; then echo "linking $script from $HOOKDIR/$hook" ln -s "$HOOKDIR/$hook/$script" "$GIT_DIR"/hooks/$hook.d else die "unknown script '$script'" fi } cmd_remove () Loading