tazwok annotate chroot-scripts/gen-iso @ rev 334
Last commit here: tazwok is no more experimental
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Tue Feb 22 01:56:15 2011 +0100 (2011-02-22) |
parents | 35ceb7fc85e0 |
children | db18d2db42c2 |
rev | line source |
---|---|
gokhlayeh@315 | 1 #!/bin/sh |
gokhlayeh@334 | 2 # Little script to cook flavor in tazwok chroot waiting |
gokhlayeh@315 | 3 # for something more consistent into tazlito. |
gokhlayeh@315 | 4 |
gokhlayeh@315 | 5 [ "$1" ] || { echo "Usage: gen-iso flavorname [gzip]" >&2; exit 1; } |
gokhlayeh@315 | 6 source /usr/lib/slitaz/libtaz |
gokhlayeh@315 | 7 |
gokhlayeh@315 | 8 [ -d "$SLITAZ_DIR/flavors" ] || ln -s $LOCAL_REPOSITORY/flavors $SLITAZ_DIR |
gokhlayeh@315 | 9 if [ -d "$SLITAZ_DIR/flavors/$1" ]; then |
gokhlayeh@315 | 10 source_lib report |
gokhlayeh@315 | 11 export log_opt=$LOCAL_REPOSITORY/log/iso-$1.html |
gokhlayeh@315 | 12 rm -f $log_opt |
gokhlayeh@315 | 13 report start |
gokhlayeh@315 | 14 if ! [ -x /usr/bin/tazlito ]; then |
gokhlayeh@315 | 15 report step "Installing tazlito" |
gokhlayeh@315 | 16 tazpkg get-install tazlito || report exit "Installation of tazlito failed." |
gokhlayeh@315 | 17 fi |
gokhlayeh@315 | 18 [ -d "$SLITAZ_DIR/distro" ] && rm -r $SLITAZ_DIR/distro |
gokhlayeh@315 | 19 report step "Generating ISO $1" |
gokhlayeh@315 | 20 cd $tmp |
gokhlayeh@315 | 21 tazlito get-flavor $1 || report exit "Get flavor failed" |
gokhlayeh@315 | 22 sed "/^ISO_NAME/ s/$1/$SLITAZ_VERSION-$1/" -i tazlito.conf |
gokhlayeh@315 | 23 [ "$2" = gzip ] && echo "COMPRESSION=gzip" >> tazlito.conf |
gokhlayeh@315 | 24 echo -e "\n" | tazlito gen-distro || report exit "Generation of iso failed" |
gokhlayeh@315 | 25 cp $SLITAZ_DIR/distro/*.iso $SLITAZ_DIR/distro/*.md5 $LOCAL_REPOSITORY/iso |
gokhlayeh@315 | 26 clean-chroot |
gokhlayeh@315 | 27 report stop |
gokhlayeh@315 | 28 else |
gokhlayeh@315 | 29 echo "$SLITAZ_DIR/flavors/$1 doesn't exists." >&2 |
gokhlayeh@315 | 30 exit 1 |
gokhlayeh@315 | 31 fi |