From 783c48740a8ec1bb0c2033362afd20a1ae3d07a8 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 17 Aug 2015 14:31:23 +0000 Subject: =?UTF-8?q?whitespace=20normalization=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gbp-Dch: Ignore --- pbuilder-runhooks | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'pbuilder-runhooks') diff --git a/pbuilder-runhooks b/pbuilder-runhooks index 3b34e18..26a1158 100644 --- a/pbuilder-runhooks +++ b/pbuilder-runhooks @@ -74,36 +74,36 @@ function unloadhooks () { function executehooks () { local prefix="$1" if [ -z "$HOOKDIR" ]; then - return ; + return fi for fn in "$BUILDPLACE/$hooks/$prefix"[0-9][0-9]* ; do - case "$fn" in - "$BUILDPLACE/$hooks/$prefix"'[0-9][0-9]*') - log "W: no hooks of type ${prefix} found -- ignoring" - ;; - *~) - log "W: skipping an editor backup file $fn" - ;; - *.bak) - log "W: skipping a backup file $fn" - ;; - *) - if [ -x "$fn" ]; then - log "I: user script $fn starting" - BUILDDIR="$BUILDDIR" \ - $CHROOTEXEC "/$hooks/"$(basename "$fn") - log "I: user script $fn finished" - else - if [ -f "$fn" ]; then - filetype=$(basename "$fn" ) - log "W: execute priv not set on file $filetype, not executing." - else - # Should it reach here ? This case should be caught in the above case. - log "W: no hooks of type ${prefix} found -- internal error in logic" - fi - fi - ;; - esac + case "$fn" in + "$BUILDPLACE/$hooks/$prefix"'[0-9][0-9]*') + log "W: no hooks of type ${prefix} found -- ignoring" + ;; + *~) + log "W: skipping an editor backup file $fn" + ;; + *.bak) + log "W: skipping a backup file $fn" + ;; + *) + if [ -x "$fn" ]; then + log "I: user script $fn starting" + BUILDDIR="$BUILDDIR" \ + $CHROOTEXEC "/$hooks/"$(basename "$fn") + log "I: user script $fn finished" + else + if [ -f "$fn" ]; then + filetype=$(basename "$fn" ) + log "W: execute priv not set on file $filetype, not executing." + else + # Should it reach here ? This case should be caught in the above case. + log "W: no hooks of type ${prefix} found -- internal error in logic" + fi + fi + ;; + esac done } -- cgit v1.2.3