From 3b308f4740e47a594e1939d5a10af7aea89781f8 Mon Sep 17 00:00:00 2001 From: Michele Tartara Date: Tue, 30 Jul 2013 15:17:11 +0000 Subject: [PATCH] Make build_chroot compatible with Squeeze Modify build_chroot to make it compatible with debian Squeeze. This is done by using a function instead of a alias for the command that was failing. Fixes Issue 507. Signed-off-by: Michele Tartara Reviewed-by: Thomas Thrainer --- devel/build_chroot | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/devel/build_chroot b/devel/build_chroot index 17e67be..c65b5ff 100755 --- a/devel/build_chroot +++ b/devel/build_chroot @@ -88,14 +88,16 @@ apt-get install -y schroot debootstrap shopt -s expand_aliases alias in_chroot='schroot -c $CHNAME -d / ' -alias subst_variables='sed \ - -e "s/\${ARCH}/$ARCH/" \ - -e "s*\${CHDIR}*$CHDIR*" \ - -e "s/\${CHNAME}/$CHNAME/" \ - -e "s/\${CHROOTNAME}/$CHROOTNAME/" \ - -e "s*\${CHROOT_DIR}*$CHROOT_DIR*" \ - -e "s/\${COMP_FILENAME}/$COMP_FILENAME/" \ - -e "s/\${DIST_RELEASE}/$DIST_RELEASE/"' +function subst_variables { + sed \ + -e "s/\${ARCH}/$ARCH/" \ + -e "s*\${CHDIR}*$CHDIR*" \ + -e "s/\${CHNAME}/$CHNAME/" \ + -e "s/\${CHROOTNAME}/$CHROOTNAME/" \ + -e "s*\${CHROOT_DIR}*$CHROOT_DIR*" \ + -e "s/\${COMP_FILENAME}/$COMP_FILENAME/" \ + -e "s/\${DIST_RELEASE}/$DIST_RELEASE/" $@ +} #Generate chroot configurations cat $ACTUAL_DATA_DIR/temp.schroot.conf.in | subst_variables > $TEMP_CHROOT_CONF -- 1.7.10.4