Use plain sh instead of bash in the git template hooks.

The scripts are simple enough and should work fine under any POSIX shell,
which is particularly helpful when one is using `gclient sync' on a platform
that does not have /bin/bash (ie. it's installed in another location or not
present at all), since the hooks are automatically added to the git
checkouts.

While here, just `exec' the scripts directly instead of invoking another
shell by hand and remove the redundant `exit 0' lines.

R=cmp@chromium.org,dpranke@chromium.org,szager@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214177 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
raphael.kubo.da.costa@intel.com 13 years ago
parent a0d4757e90
commit 2666f735b1

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/applypatch-msg" ] && exec bash "build/git-hooks/applypatch-msg" "$@"
exit 0
[ -e "build/git-hooks/applypatch-msg" ] && exec "build/git-hooks/applypatch-msg" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/post-applypatch" ] && exec bash "build/git-hooks/post-applypatch" "$@"
exit 0
[ -e "build/git-hooks/post-applypatch" ] && exec "build/git-hooks/post-applypatch" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/post-checkout" ] && exec bash "build/git-hooks/post-checkout" "$@"
exit 0
[ -e "build/git-hooks/post-checkout" ] && exec "build/git-hooks/post-checkout" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/post-commit" ] && exec bash "build/git-hooks/post-commit" "$@"
exit 0
[ -e "build/git-hooks/post-commit" ] && exec "build/git-hooks/post-commit" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/post-merge" ] && exec bash "build/git-hooks/post-merge" "$@"
exit 0
[ -e "build/git-hooks/post-merge" ] && exec "build/git-hooks/post-merge" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/post-update" ] && exec bash "build/git-hooks/post-update" "$@"
exit 0
[ -e "build/git-hooks/post-update" ] && exec "build/git-hooks/post-update" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/pre-applypatch" ] && exec bash "build/git-hooks/pre-applypatch" "$@"
exit 0
[ -e "build/git-hooks/pre-applypatch" ] && exec "build/git-hooks/pre-applypatch" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/pre-auto-gc" ] && exec bash "build/git-hooks/pre-auto-gc" "$@"
exit 0
[ -e "build/git-hooks/pre-auto-gc" ] && exec "build/git-hooks/pre-auto-gc" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/pre-commit" ] && exec bash "build/git-hooks/pre-commit" "$@"
exit 0
[ -e "build/git-hooks/pre-commit" ] && exec "build/git-hooks/pre-commit" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/pre-rebase" ] && exec bash "build/git-hooks/pre-rebase" "$@"
exit 0
[ -e "build/git-hooks/pre-rebase" ] && exec "build/git-hooks/pre-rebase" "$@"

@ -1,4 +1,3 @@
#!/bin/bash
#!/bin/sh
[ -e "build/git-hooks/prepare-commit-msg" ] && exec bash "build/git-hooks/prepare-commit-msg" "$@"
exit 0
[ -e "build/git-hooks/prepare-commit-msg" ] && exec "build/git-hooks/prepare-commit-msg" "$@"

Loading…
Cancel
Save