tazwok view chroot-scripts/gen-iso @ rev 488

Change VERSION to 4.2.12
author Antoine Bodin <gokhlayeh@slitaz.org>
date Thu Apr 07 19:47:02 2011 +0200 (2011-04-07)
parents 6d514a2cd9ef
children
line source
1 #!/bin/sh
2 # Little script to cook flavor in tazwok chroot waiting
3 # for something more consistent in tazlito.
5 [ "$1" ] || { echo "Usage: gen-iso flavorname [gzip]" >&2; exit 1; }
6 source /usr/lib/slitaz/libtaz
8 # Report progress on webserver.
9 log_step="$LOCAL_REPOSITORY/log/step"
10 run_on_exit="$run_on_exit
11 rm -f $LOCAL_REPOSITORY/log/step
12 rm -f $LOCAL_REPOSITORY/log/package"
14 [ -d "$SLITAZ_DIR/flavors" ] || ln -s $LOCAL_REPOSITORY/flavors $SLITAZ_DIR
15 if [ -d "$SLITAZ_DIR/flavors/$1" ]; then
16 source_lib report
17 export log_opt=$LOCAL_REPOSITORY/log/iso-$1.html
18 rm -f $log_opt
19 echo "iso-$1" > $LOCAL_REPOSITORY/log/package
20 report start
21 if ! [ -x /usr/bin/tazlito ]; then
22 report step "Installing tazlito"
23 tazpkg get-install tazlito || report exit "Installation of tazlito failed."
24 fi
25 [ -d "$SLITAZ_DIR/distro" ] && rm -r $SLITAZ_DIR/distro
26 report step "Generating ISO $1"
27 cd $tmp
28 tazlito get-flavor $1 || report exit "Get flavor failed"
29 sed "/^ISO_NAME/ s/$1/$SLITAZ_VERSION-$1/" -i tazlito.conf
30 [ "$2" = gzip ] && echo "COMPRESSION=gzip" >> tazlito.conf
31 echo -e "\n" | tazlito gen-distro || report exit "Generation of iso failed"
32 cp $LOCAL_REPOSITORY/distro/*.iso $LOCAL_REPOSITORY/distro/*.md5 $LOCAL_REPOSITORY/iso
33 clean-chroot
34 report stop
35 else
36 echo "$SLITAZ_DIR/flavors/$1 doesn't exist." >&2
37 exit 1
38 fi