diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-03 09:13:30 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-03 09:13:30 +0100 |
commit | fc1c42b44655cd207fc3aa259556181c0f44abd4 (patch) | |
tree | 6e591e2d80efb632a7b9410eb84f750432c45406 | |
parent | b8a1d750f113fcbf49f2e67e4b4d1eab9a1d7c3c (diff) |
git-hooks: make non-existing repo non-fatal in install
Change-Id: Ia622993e091174b8212dc4d65f02dd1332a91389
-rwxr-xr-x | git-hooks/install | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-hooks/install b/git-hooks/install index 020d780..96a0f8a 100755 --- a/git-hooks/install +++ b/git-hooks/install @@ -16,7 +16,10 @@ for i in $(find . -name hooks) do for j in $i/* do - [ -e $prefix/$j ] || die "$prefix/$j doesn't exists, remove from repo" + if [ ! -e $prefix/$j ]; then + echo "$prefix/$j doesn't exists, remove from repo" + continue + fi if ! diff -q -u $j $prefix/$j; then if [ ! -w $prefix/$j ]; then echo "$prefix/$j is not writable, skipping" |