From dbe6a82bc031ecc8d9ba4230350bdd6277f905f6 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 10 Jan 2012 14:44:42 +0100 Subject: Make lb_chroot_hooks work with dash. Apparently, dash doesn't expand shell patterns within a quoted string, whereas bash does. We can't remove the quoting entirely, though, since that would cause problems when $LB_BASE or $_HOOK contains spaces (note that $_HOOK can probably never contain spaces, but let's handle it just in case). Only quoting the expansion of $LB_BASE and $_HOOK, but not the shell pattern should make the hooks work with both bash and dash again. --- scripts/build/lb_chroot_hooks | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/build/lb_chroot_hooks b/scripts/build/lb_chroot_hooks index 708045919..37f26df28 100755 --- a/scripts/build/lb_chroot_hooks +++ b/scripts/build/lb_chroot_hooks @@ -43,10 +43,10 @@ Create_lockfile .lock # Copying hooks for _HOOK in ${LB_CHROOT_HOOKS} do - if [ -e "${LB_BASE}/hooks/???-${_HOOK}.chroot" ] + if [ -e "${LB_BASE}"/hooks/???-"${_HOOK}".chroot ] then mkdir -p chroot/root/lb_chroot_hooks - cp "${LB_BASE}/hooks/???-${_HOOK}.chroot" chroot/root/lb_chroot_hooks + cp "${LB_BASE}"/hooks/???-"${_HOOK}".chroot chroot/root/lb_chroot_hooks fi done -- cgit v1.2.3