From 1e7455675fc91390fc280255a5bed64d35fa8062 Mon Sep 17 00:00:00 2001 From: dancer Date: Thu, 27 Sep 2001 11:03:56 +0000 Subject: removing pushd and popd. --- pbuilder-runhooks | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pbuilder-runhooks') diff --git a/pbuilder-runhooks b/pbuilder-runhooks index 8e19bca..e8d1cc8 100644 --- a/pbuilder-runhooks +++ b/pbuilder-runhooks @@ -18,6 +18,9 @@ # # HISTORY: # $Log$ +# Revision 1.6 2001/09/27 11:03:56 dancer +# removing pushd and popd. +# # Revision 1.5 2001/09/27 09:16:34 dancer # fixing some serious typos . # @@ -83,10 +86,9 @@ function unloadhooks () { # function executehooks () { - local prefix=$1 + local prefix="$1" # is this necessary? - pushd $BUILDPLACE/$hooks - for fn in $prefix[0-9][0-9]* ; do + for fn in "$BUILDPLACE/$hooks/$prefix"[0-9][0-9]* ; do case "$fn" in *~) echo "E: skipping an editor backup file $fn" @@ -96,16 +98,15 @@ function executehooks () { ;; *) if [ -x $fn ]; then - $CHROOTEXEC "$hooks/$fn" + $CHROOTEXEC "$hooks/"$(basename "$fn") echo " -> user script $fn finished" else - filetype=$(readlink -f "$fn") + filetype=$(readlink -f $(basename "$fn" ) ) echo "E: execute priv not set on file $filetype" fi ;; esac done - popd } #-------------------------------------------------------------------------- -- cgit v1.2.3