tazwok diff chroot-scripts/gen-iso @ rev 315
Move tazwok-related chroot scripts from tazchroot to tazwok sources
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Feb 18 18:13:38 2011 +0100 (2011-02-18) |
parents | |
children | 08c39bd8d068 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/chroot-scripts/gen-iso Fri Feb 18 18:13:38 2011 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +#!/bin/sh 1.5 +# Little script to cook flavor in tazwok-experimental' chroot waiting 1.6 +# for something more consistent into tazlito. 1.7 + 1.8 +[ "$1" ] || { echo "Usage: gen-iso flavorname [gzip]" >&2; exit 1; } 1.9 +source /usr/lib/slitaz/libtaz 1.10 + 1.11 +[ -d "$SLITAZ_DIR/flavors" ] || ln -s $LOCAL_REPOSITORY/flavors $SLITAZ_DIR 1.12 +if [ -d "$SLITAZ_DIR/flavors/$1" ]; then 1.13 + source_lib report 1.14 + export log_opt=$LOCAL_REPOSITORY/log/iso-$1.html 1.15 + rm -f $log_opt 1.16 + report start 1.17 + if ! [ -x /usr/bin/tazlito ]; then 1.18 + report step "Installing tazlito" 1.19 + tazpkg get-install tazlito || report exit "Installation of tazlito failed." 1.20 + fi 1.21 + [ -d "$SLITAZ_DIR/distro" ] && rm -r $SLITAZ_DIR/distro 1.22 + report step "Generating ISO $1" 1.23 + cd $tmp 1.24 + tazlito get-flavor $1 || report exit "Get flavor failed" 1.25 + sed "/^ISO_NAME/ s/$1/$SLITAZ_VERSION-$1/" -i tazlito.conf 1.26 + [ "$2" = gzip ] && echo "COMPRESSION=gzip" >> tazlito.conf 1.27 + echo -e "\n" | tazlito gen-distro || report exit "Generation of iso failed" 1.28 + cp $SLITAZ_DIR/distro/*.iso $SLITAZ_DIR/distro/*.md5 $LOCAL_REPOSITORY/iso 1.29 + clean-chroot 1.30 + report stop 1.31 +else 1.32 + echo "$SLITAZ_DIR/flavors/$1 doesn't exists." >&2 1.33 + exit 1 1.34 +fi