summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build/lb_binary_hooks11
-rwxr-xr-xscripts/build/lb_chroot_hooks14
2 files changed, 14 insertions, 11 deletions
diff --git a/scripts/build/lb_binary_hooks b/scripts/build/lb_binary_hooks
index 07cf4577c..97faa3077 100755
--- a/scripts/build/lb_binary_hooks
+++ b/scripts/build/lb_binary_hooks
@@ -43,17 +43,18 @@ Create_lockfile .lock
# Running hooks
for _HOOK in ${LB_BINARY_HOOKS}
do
- for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
+ for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
+ do
+ for FILE in "${LOCATION}"/???-"${_HOOK}".binary
do
- if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
+ if [ -e "${FILE}" ]
then
cd binary
- ./"${LOCATION}/hooks/???-${_HOOK}.binary" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
+ ./"${FILE}" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
cd "${OLDPWD}"
-
- continue
fi
done
+ done
done
## Processing local hooks
diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks
index 0ccfe2b32..e8a03d0f6 100755
--- a/scripts/build/lb_chroot_hooks
+++ b/scripts/build/lb_chroot_hooks
@@ -54,12 +54,14 @@ for _HOOK in ${LB_CHROOT_HOOKS}
do
for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
do
- if [ -e "${LOCATION}/hooks/???-${_HOOK}.binary" ]
- then
- mkdir -p chroot/root/lb_chroot_hooks
- cp "${LOCATION}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks
- continue
- fi
+ for FILE in "${LOCATION}"/???-"${_HOOK}".chroot
+ do
+ if [ -e "${FILE}" ]
+ then
+ mkdir -p chroot/root/lb_chroot_hooks
+ cp "${FILE}" chroot/root/lb_chroot_hooks
+ fi
+ done
done
done