aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-runhooks
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-08-17 14:31:23 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-08-17 14:31:23 +0000
commit783c48740a8ec1bb0c2033362afd20a1ae3d07a8 (patch)
tree7b140d32e505f31a904e90e1de361e898124aa84 /pbuilder-runhooks
parentbcaeb729122fd027a33941af1d51424f532db8ee (diff)
downloadpbuilder-783c48740a8ec1bb0c2033362afd20a1ae3d07a8.tar
pbuilder-783c48740a8ec1bb0c2033362afd20a1ae3d07a8.tar.gz
whitespace normalization …
Gbp-Dch: Ignore
Diffstat (limited to 'pbuilder-runhooks')
-rw-r--r--pbuilder-runhooks56
1 files changed, 28 insertions, 28 deletions
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
}