aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-runhooks
diff options
context:
space:
mode:
authordancer <dancer>2002-02-24 07:57:06 +0000
committerdancer <dancer>2002-02-24 07:57:06 +0000
commit18651eedb6cc79c55aeaf3c86d57d93feeb7f58e (patch)
treedadaac67ef53d6bc43c08cb9f9c9a1e4cfd1b544 /pbuilder-runhooks
parentd452345203ac424265b65fb905a517f471dafd91 (diff)
downloadpbuilder-18651eedb6cc79c55aeaf3c86d57d93feeb7f58e.tar
pbuilder-18651eedb6cc79c55aeaf3c86d57d93feeb7f58e.tar.gz
added hooks support for pbuilder build target.
Diffstat (limited to 'pbuilder-runhooks')
-rw-r--r--pbuilder-runhooks14
1 files changed, 13 insertions, 1 deletions
diff --git a/pbuilder-runhooks b/pbuilder-runhooks
index da7cf4a..822996f 100644
--- a/pbuilder-runhooks
+++ b/pbuilder-runhooks
@@ -18,6 +18,9 @@
#
# HISTORY:
# $Log$
+# Revision 1.12 2002/02/24 07:57:06 dancer
+# added hooks support for pbuilder build target.
+#
# Revision 1.11 2001/10/21 05:03:21 dancer
# fixing bugs related to runhooks, reported by Dale. Some serious logic disorder seems to be.
#
@@ -69,6 +72,9 @@ hooks=tmp/hooks
#
function loadhooks () {
+ if [ -z "$HOOKDIR" ]; then
+ return ;
+ fi
if [ -d "$BUILDPLACE/$hooks" ]; then
rm -rf "$BUILDPLACE/$hooks"
fi
@@ -83,6 +89,9 @@ function loadhooks () {
#
function unloadhooks () {
+ if [ -z "$HOOKDIR" ]; then
+ return ;
+ fi
if [ -d "$BUILDPLACE/$hooks" ]; then
rm -rf "$BUILDPLACE/$hooks"
else
@@ -103,6 +112,9 @@ function unloadhooks () {
function executehooks () {
local prefix="$1"
+ if [ -z "$HOOKDIR" ]; then
+ return ;
+ fi
for fn in "$BUILDPLACE/$hooks/$prefix"[0-9][0-9]* ; do
case "$fn" in
*~)
@@ -112,7 +124,7 @@ function executehooks () {
echo "W: skipping a backup file $fn"
;;
*)
- if [ -x $fn ]; then
+ if [ -x "$fn" ]; then
$CHROOTEXEC "$hooks/"$(basename "$fn")
echo " -> user script $fn finished"
else