fix post-receive hook to account for empty post-receive-chained.d

This commit is contained in:
clime 2019-03-11 15:51:49 +01:00
parent eb9ab02d02
commit 465967d52b
2 changed files with 7 additions and 2 deletions

View file

@ -76,7 +76,7 @@ rlJournalStart
modified_prev=`jq '.["/rpms/prunerepo.git"].modified' manifest.js.prev`
modified=`jq '.["/rpms/prunerepo.git"].modified' manifest.js`
rlAssertGreater "Check that 'modifed' timestamp has been updated in the manifest file" $modified $modified_prev
rlAssertGreater "Check that 'modified' timestamp has been updated in the manifest file" $modified $modified_prev
cd $CWD
rlPhaseEnd

View file

@ -1,4 +1,9 @@
#!/bin/bash
dirpath="$GIT_DIR/hooks/post-receive-chained.d"
files=( "$dirpath"/* )
# pee redirects stdin to each of the post-receive hooks in place.
/usr/bin/pee $GIT_DIR/hooks/post-receive-chained.d/*
if [[ -e "$files" || -L "$files" ]]; then
/usr/bin/pee "$dirpath"/*
fi