Commit 3b308f47 authored by Michele Tartara's avatar Michele Tartara

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: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
parent b51e14c0
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment