tazlito rev 137

box: move gen-liveflavor and clean-distro to functions
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jan 23 17:18:32 2010 +0100 (2010-01-23)
parents f2b3006d4e42
children a31e7804380b
files tazlitobox
line diff
     1.1 --- a/tazlitobox	Sat Jan 23 17:10:02 2010 +0100
     1.2 +++ b/tazlitobox	Sat Jan 23 17:18:32 2010 +0100
     1.3 @@ -52,6 +52,24 @@
     1.4  		-e "tazlito writeiso $COMPRESSION"
     1.5  }
     1.6  
     1.7 +gen_liveflavor_action()
     1.8 +{
     1.9 +	cd /home/slitaz
    1.10 +	sed -i "s/ISO_NAME=.*/ISO_NAME=\"slitaz-$GEN_LIVEFLAVOR_NAME\"/" \
    1.11 +		/etc/tazlito/tazlito.conf
    1.12 +	xterm -geometry 80x16 \
    1.13 +		-title "gen-liveflavor" \
    1.14 +		-e "tazlito gen-liveflavor $GEN_LIVEFLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"
    1.15 +}
    1.16 +
    1.17 +clean_distro_action()
    1.18 +{
    1.19 +	cd /home/slitaz
    1.20 +	xterm -geometry 80x16 \
    1.21 +		-title "clean-distro" \
    1.22 +		-e "tazlito clean-distro && sleep 1"
    1.23 +}
    1.24 +
    1.25  export HELP='
    1.26  <window title="Tazlito Box - Help" icon-name="media-cdrom">
    1.27  <vbox>
    1.28 @@ -205,15 +223,12 @@
    1.29          <button>
    1.30            <label>Gen distro</label>
    1.31            <input file icon="forward"></input>
    1.32 -          <action>cd /home/slitaz</action>
    1.33 -          <action>sed -i "s/ISO_NAME=.*/ISO_NAME=\"slitaz-$GEN_LIVEFLAVOR_NAME\"/" /etc/tazlito/tazlito.conf</action>
    1.34 -          <action>xterm -geometry 80x16 -title "gen-liveflavor" -e "tazlito gen-liveflavor $GEN_LIVEFLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"</action>
    1.35 +          <action>$BIN gen_liveflavor_action</action>
    1.36          </button>
    1.37          <button>
    1.38            <label>Clean distro</label>
    1.39            <input file icon="edit-clear"></input>
    1.40 -          <action>cd /home/slitaz</action>
    1.41 -          <action>xterm -geometry 80x16 -title "clean-distro" -e "tazlito clean-distro && sleep 1"</action>
    1.42 +          <action>$BIN clean_distro_action</action>
    1.43          </button>
    1.44        </hbox>
    1.45        
    1.46 @@ -266,7 +281,7 @@
    1.47          <button>
    1.48            <label>Clean distro</label>
    1.49            <input file icon="edit-clear"></input>
    1.50 -          <action>xterm -geometry 80x16 -title "clean-distro" -e "tazlito clean-distro && sleep 1"</action>
    1.51 +          <action>$BIN clean_distro_action</action>
    1.52          </button>
    1.53        </hbox>
    1.54      </frame>