tazlito rev 161
tazlito pack-flavor: merge extra file from first flavor
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 22 17:37:10 2010 +0100 (2010-02-22) |
parents | 4e3d0f1fdb7e |
children | 15c9c8e0da1c |
files | tazlito |
line diff
1.1 --- a/tazlito Mon Feb 22 16:15:38 2010 +0100 1.2 +++ b/tazlito Mon Feb 22 17:37:10 2010 +0100 1.3 @@ -1054,14 +1054,28 @@ 1.4 [ -f $FLAVORS_REPOSITORY/$2/packages.list ] || 1.5 tazlito extract-flavor $2 1.6 get_pkglist $2 > $TMP_DIR/$FLAVOR.pkglist 1.7 + for i in rootcd rootfs; do 1.8 + mkdir $TMP_DIR/$i 1.9 + # Copy extra files from the first flavor 1.10 + [ -d $FLAVORS_REPOSITORY/$2/$i ] && 1.11 + cp -a $FLAVORS_REPOSITORY/$2/$i $TMP_DIR 1.12 + # Overload extra files by meta flavor 1.13 + [ -d $FLAVORS_REPOSITORY/$FLAVOR/$i ] && 1.14 + cp -a $FLAVORS_REPOSITORY/$FLAVOR/$i $TMP_DIR 1.15 + [ -n "$(ls $TMP_DIR/$i)" ] && 1.16 + ( cd $TMP_DIR/$i ; find . | cpio -o -H newc 2> /dev/null ) | \ 1.17 + gzip -9 >$TMP_DIR/$FLAVOR.$i 1.18 + rm -rf $TMP_DIR/$i 1.19 + done 1.20 + else 1.21 + for i in rootcd rootfs; do 1.22 + [ -d $FLAVORS_REPOSITORY/$FLAVOR/$i ] || \ 1.23 + continue 1.24 + ( cd $FLAVORS_REPOSITORY/$FLAVOR/$i ; \ 1.25 + find . | cpio -o -H newc 2> /dev/null ) | \ 1.26 + gzip -9 >$TMP_DIR/$FLAVOR.$i 1.27 + done 1.28 fi 1.29 - for i in rootcd rootfs; do 1.30 - [ -d $FLAVORS_REPOSITORY/$FLAVOR/$i ] || \ 1.31 - continue 1.32 - ( cd $FLAVORS_REPOSITORY/$FLAVOR/$i ; find . | \ 1.33 - cpio -o -H newc 2> /dev/null ) | \ 1.34 - gzip -9 >$TMP_DIR/$FLAVOR.$i 1.35 - done 1.36 if [ -s $TMP_DIR/$FLAVOR.rootfs ]; then 1.37 packed_size=$(($packed_size \ 1.38 + $(cat $TMP_DIR/$FLAVOR.rootfs | wc -c ) / 100 ))