Revision 3b308f47

b/devel/build_chroot
88 88

  
89 89
shopt -s expand_aliases
90 90
alias in_chroot='schroot -c $CHNAME -d / '
91
alias subst_variables='sed \
92
  -e "s/\${ARCH}/$ARCH/" \
93
  -e "s*\${CHDIR}*$CHDIR*" \
94
  -e "s/\${CHNAME}/$CHNAME/" \
95
  -e "s/\${CHROOTNAME}/$CHROOTNAME/" \
96
  -e "s*\${CHROOT_DIR}*$CHROOT_DIR*" \
97
  -e "s/\${COMP_FILENAME}/$COMP_FILENAME/" \
98
  -e "s/\${DIST_RELEASE}/$DIST_RELEASE/"'
91
function subst_variables {
92
  sed \
93
    -e "s/\${ARCH}/$ARCH/" \
94
    -e "s*\${CHDIR}*$CHDIR*" \
95
    -e "s/\${CHNAME}/$CHNAME/" \
96
    -e "s/\${CHROOTNAME}/$CHROOTNAME/" \
97
    -e "s*\${CHROOT_DIR}*$CHROOT_DIR*" \
98
    -e "s/\${COMP_FILENAME}/$COMP_FILENAME/" \
99
    -e "s/\${DIST_RELEASE}/$DIST_RELEASE/" $@
100
}
99 101

  
100 102
#Generate chroot configurations
101 103
cat $ACTUAL_DATA_DIR/temp.schroot.conf.in | subst_variables > $TEMP_CHROOT_CONF

Also available in: Unified diff