tazlito diff oldstuff/tazlitobox @ rev 509

Take care of installed /boot/isolinux/efi.img
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jun 03 14:17:50 2018 +0200 (18 months ago)
parents 5efb0b404472
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/oldstuff/tazlitobox	Sun Jun 03 14:17:50 2018 +0200
     1.3 @@ -0,0 +1,662 @@
     1.4 +#!/bin/sh
     1.5 +# 
     1.6 +# Gtkdialog box for Tazlito - SliTaz Live Tool.
     1.7 +# Tabs are used for indent and all actions should go into functions to
     1.8 +# separate the GUI and commands.
     1.9 +#
    1.10 +# (C) GNU gpl v3 - SliTaz GNU/Linux 2011.
    1.11 +#
    1.12 +VERSION=4.0
    1.13 +
    1.14 +# Include gettext helper script.
    1.15 +. /usr/bin/gettext.sh
    1.16 +
    1.17 +# Export package name for gettext.
    1.18 +TEXTDOMAIN='tazusbbox'
    1.19 +export TEXTDOMAIN
    1.20 +
    1.21 +export BIN=$0
    1.22 +
    1.23 +# Check if user is root.
    1.24 +check_root()
    1.25 +{
    1.26 +	if test $(id -u) != 0 ; then
    1.27 +		echo -e "
    1.28 +You must be root to run `basename $0`. Please type 'su' and 
    1.29 +root password to become super-user.\n"
    1.30 +		exit 0
    1.31 +	fi
    1.32 +}
    1.33 +
    1.34 +# We need to parse flavors.list for GTK tree.
    1.35 +list_flavors()
    1.36 +{
    1.37 +	tazlito list-flavors | grep ^[a-z] | while read line
    1.38 +	do		
    1.39 +		info=`echo -n $line | awk '{print $1 " " $2 " " $3}'`
    1.40 +		printinfo=`echo -n $line | awk '{print $1 "|" $2 "|" $3}'`
    1.41 +		echo "$printinfo|`echo $line | sed s/\"$info\"//`"
    1.42 +	done
    1.43 +}
    1.44 +
    1.45 +recharge_list()
    1.46 +{
    1.47 +	xterm -geometry 90x14 \
    1.48 +		-title "list-flavors --recharge" \
    1.49 +		-e "tazlito list-flavors --recharge | grep ^[a-z] && sleep 2"
    1.50 +}
    1.51 +
    1.52 +# When using gen-liveflavor, gen-flavor or gen-distro, a user can put some
    1.53 +# addfiles copied into the rootfs.
    1.54 +addfiles_action()
    1.55 +{
    1.56 +	cd /home/slitaz
    1.57 +	mkdir -p distro/addfiles/rootfs/usr/share/images
    1.58 +	mkdir -p distro/addfiles/rootcd
    1.59 +	file-manager distro/addfiles &
    1.60 +}
    1.61 +
    1.62 +writeiso_action()
    1.63 +{
    1.64 +	xterm -geometry 80x16 \
    1.65 +		-title "writeiso" \
    1.66 +		-e "tazlito writeiso $COMPRESSION"
    1.67 +}
    1.68 +
    1.69 +gen_liveflavor_action()
    1.70 +{
    1.71 +	cd /home/slitaz
    1.72 +	sed -i "s/ISO_NAME=.*/ISO_NAME=\"slitaz-$GEN_LIVEFLAVOR_NAME\"/" \
    1.73 +		/etc/tazlito/tazlito.conf
    1.74 +	xterm -geometry 80x16 \
    1.75 +		-title "gen-liveflavor" \
    1.76 +		-e "tazlito gen-liveflavor $GEN_LIVEFLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"
    1.77 +}
    1.78 +
    1.79 +clean_distro_action()
    1.80 +{
    1.81 +	cd /home/slitaz
    1.82 +	xterm -geometry 80x16 \
    1.83 +		-title "clean-distro" \
    1.84 +		-e "tazlito clean-distro && sleep 1"
    1.85 +}
    1.86 +
    1.87 +show_flavors()
    1.88 +{
    1.89 +	tazlito list-flavors | \
    1.90 +	awk '{if (show && $1 != "") print $1} /^==/ {show=1}'
    1.91 +}
    1.92 +
    1.93 +get_flavor_action()
    1.94 +{
    1.95 +	cd /home/slitaz
    1.96 +	xterm -geometry 80x16 \
    1.97 +		-title "get-flavor $COMMUNITY_FLAVOR" \
    1.98 +		-e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close"
    1.99 +}
   1.100 +
   1.101 +gen_distro_action()
   1.102 +{
   1.103 +	cd /home/slitaz
   1.104 +	xterm -geometry 80x16 \
   1.105 +		-title "gen-distro" \
   1.106 +		-e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close"
   1.107 +}
   1.108 +
   1.109 +gen_flavor_action()
   1.110 +{
   1.111 +	cd /home/slitaz
   1.112 +	xterm -geometry 80x16 \
   1.113 +		-title "gen-flavor $GEN_FLAVOR_NAME" \
   1.114 +		-e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"
   1.115 +}
   1.116 +
   1.117 +edit_distro_script()
   1.118 +{
   1.119 +	[ ! -f $DISTRO_SCRIPT ] && echo "#!/bin/sh" > $DISTRO_SCRIPT
   1.120 +	chmod +x $DISTRO_SCRIPT
   1.121 +	editor $DISTRO_SCRIPT
   1.122 +}
   1.123 +
   1.124 +loram_action()
   1.125 +{
   1.126 +	case "$LORAM_RAM$LORAM_CDROM$LORAM_CDROM_SMALL" in
   1.127 +	falsefalsetrue)	type=smallcdrom ;;
   1.128 +	falsetruefalse)	type=cdrom ;;
   1.129 +	*)		type=ram ;;
   1.130 +	esac
   1.131 +	xterm -geometry 80x16 \
   1.132 +		-title "build loram iso image $LORAM_OUT" \
   1.133 +		-e "tazlito build-loram $LORAM_IN $LORAM_OUT $type ; echo -e \"----\nENTER to continue...\" && read close"
   1.134 +}
   1.135 +
   1.136 +merge_input()
   1.137 +{
   1.138 +	set -- $(cat /tmp/tazlito.mergelist 2> /dev/null)
   1.139 +	while [ -n "$2" ]; do
   1.140 +		echo "$2 | $1"
   1.141 +		shift 2
   1.142 +	done
   1.143 +}
   1.144 +
   1.145 +merge_add()
   1.146 +{
   1.147 +	 echo -n " $ISO_IN $ISO_RAM" >> /tmp/tazlito.mergelist
   1.148 +}
   1.149 +
   1.150 +merge_del()
   1.151 +{
   1.152 +	set -- $(cat /tmp/tazlito.mergelist)
   1.153 +	ARGS=""
   1.154 +	while [ -n "$2" ]; do
   1.155 +		case "$1" in
   1.156 +		$ISO_ITEM) ;;
   1.157 +		*)	[ -n "$ARGS" ] && ARGS="$ARGS "
   1.158 +			ARGS="$ARGS$1 $2" ;;
   1.159 +		esac
   1.160 +		shift 2
   1.161 +	done
   1.162 +	echo -n "$ARGS" > /tmp/tazlito.mergelist
   1.163 +}
   1.164 +
   1.165 +merge_args()
   1.166 +{
   1.167 +	first=true
   1.168 +	while [ -n "$2" ]; do
   1.169 +		echo "$(stat -c "%s" $1) $1 $2"
   1.170 +		shift 2
   1.171 +	done | sort -nr | while read size file ram; do
   1.172 +		if $first; then
   1.173 +			cp $file $ISO_OUT
   1.174 +			echo -n "$ram $ISO_OUT "
   1.175 +			first=false
   1.176 +			continue
   1.177 +		fi
   1.178 +		dir=$tmp/$(basename $file)
   1.179 +		mkdir $dir
   1.180 +		mount -o loop,ro $file $dir
   1.181 +		echo -n "$ram $dir/boot/rootfs.gz "
   1.182 +	done
   1.183 +}
   1.184 +
   1.185 +merge_action()
   1.186 +{
   1.187 +	set -- $(cat /tmp/tazlito.mergelist 2> /dev/null)
   1.188 +	rm -f /tmp/tazlito.mergelist
   1.189 +	tmp=/tmp/tazlitobox$$
   1.190 +	mkdir $tmp
   1.191 +	[ -n "$4" ] || return
   1.192 +	xterm -geometry 80x16 -title "build meta iso image $ISO_OUT" \
   1.193 +		-e "script -c 'tazlito merge $(merge_args $@)' && echo -e \"----\nENTER to continue...\" && read close"
   1.194 +	mv $ISO_OUT.merged $ISO_OUT
   1.195 +	for i in $tmp/*; do
   1.196 +		umount -d $i
   1.197 +	done
   1.198 +	rm -rf $tmp
   1.199 +}
   1.200 +
   1.201 +# Boxes
   1.202 +
   1.203 +export HELP='
   1.204 +<window title="Tazlito Box - Help" icon-name="media-cdrom">
   1.205 +<vbox>
   1.206 +	<text use-markup="true">
   1.207 +		<label>"
   1.208 +<b>Tazlito Box - Help</b>"
   1.209 +		</label>
   1.210 +	</text>
   1.211 +	
   1.212 +	<frame Overview>
   1.213 +		<text wrap="true" width-chars="52" use-markup="true">
   1.214 +			<label>
   1.215 +"
   1.216 +Tazlito Box is a tiny interface to the SliTaz Live Tool aka Tazlito.
   1.217 +You can simply generate a LiveCD in a few minutes, using your
   1.218 +own flavor or one from the SliTaz community. Tazlito can also 
   1.219 +generate a LiveCD flavor using all of the currently installed 
   1.220 +packages. Tazlito commands are executed in a XTerm, you can 
   1.221 +press ENTER or the mouse to close the window.
   1.222 +"
   1.223 +			</label>
   1.224 +		</text>
   1.225 +	</frame>
   1.226 +	
   1.227 +	<frame Default paths>
   1.228 +		<text wrap="true" width-chars="50" use-markup="true">
   1.229 +			<label>
   1.230 +"
   1.231 +Distro      : /home/slitaz/distro
   1.232 +Flavors    : /home/slitaz/flavors
   1.233 +Packages : /home/slitaz/packages
   1.234 +"
   1.235 +			</label>
   1.236 +		</text>
   1.237 +	</frame>
   1.238 +	
   1.239 +	<hbox>
   1.240 +		<button>
   1.241 +			<input file icon="exit"></input>
   1.242 +			<action type="closewindow">HELP</action>
   1.243 +		</button>
   1.244 +	</hbox>
   1.245 +
   1.246 +</vbox>
   1.247 +</window>
   1.248 +'
   1.249 +
   1.250 +# List all flavors on the mirror.
   1.251 +export LIST_FLAVORS_BOX='
   1.252 +<window title="Community flavors list" icon-name="tazlito">
   1.253 +<vbox>
   1.254 +	<tree>
   1.255 +		<width>500</width><height>200</height>
   1.256 +		<variable>COMMUNITY_FLAVOR</variable>
   1.257 +		<label>Name|ISO|Rootfs|Description</label>
   1.258 +		<input exported_column="0">$BIN list_flavors</input>
   1.259 +	</tree>
   1.260 +	<hbox>
   1.261 +		<button>
   1.262 +			<label>Recharge list</label>
   1.263 +			<input file icon="reload"></input>
   1.264 +			<action>$BIN recharge_list</action>
   1.265 +			<action>refresh:COMMUNITY_FLAVOR</action>
   1.266 +		</button>
   1.267 +		<button>
   1.268 +			<label>Exit</label>
   1.269 +			<input file icon="exit"></input>
   1.270 +			<action type="closewindow">LIST_FLAVORS_BOX</action>
   1.271 +		</button>
   1.272 +	</hbox>
   1.273 +</vbox>
   1.274 +</window>'
   1.275 +
   1.276 +# Execute tazlito commands in a XTerm. Notebook: tab-pos="GTK_POS_LEFT"
   1.277 +export TAZLITO_BOX='
   1.278 +<window title="Tazlito Box" icon-name="media-cdrom">
   1.279 +<vbox>
   1.280 +
   1.281 +	<hbox>
   1.282 +	<text use-markup="true">
   1.283 +		<label>"<b>SliTaz Live Tool</b>"</label>
   1.284 +	</text>
   1.285 +	<pixmap>
   1.286 +		<input file>/usr/share/pixmaps/tazlito.png</input>
   1.287 +	</pixmap>
   1.288 +	</hbox>
   1.289 +
   1.290 +	<notebook labels="Writeiso|Live flavor|Flavors list|Gen flavor|Meta|Low RAM|Configuration">
   1.291 +
   1.292 +	<frame Filesystem to ISO>
   1.293 +
   1.294 +	<text wrap="true" width-chars="60" use-markup="true">
   1.295 +		<label>
   1.296 +"
   1.297 +Writeiso will generate an ISO image of the current filesystem as
   1.298 +is, including the /home directory. It is an easy way to remaster a
   1.299 +SliTaz Live system, you just have to: boot, modify, writeiso.
   1.300 +"
   1.301 +		</label>
   1.302 +	</text>
   1.303 +
   1.304 +	<hbox>
   1.305 +		<text use-markup="true">
   1.306 +			<label>"<b>Compression:</b>"</label>
   1.307 +		</text>
   1.308 +		<combobox>
   1.309 +			<variable>COMPRESSION</variable>
   1.310 +			<item>gzip</item>
   1.311 +			<item>lzma</item>
   1.312 +			<item>none</item>
   1.313 +		</combobox>
   1.314 +		<button>
   1.315 +			<label>Writeiso</label>
   1.316 +			<input file icon="forward"></input>
   1.317 +			<action>$BIN writeiso_action</action>
   1.318 +		</button>
   1.319 +	</hbox>
   1.320 +	
   1.321 +	</frame>
   1.322 +	
   1.323 +	<frame Current packages selection>
   1.324 +	
   1.325 +	<text wrap="true" width-chars="60" use-markup="true">
   1.326 +		<label>
   1.327 +"
   1.328 +Gen Live flavor will create a LiveCD based on all the currently
   1.329 +installed packages. To build the rootfs and ISO image it will use
   1.330 +original SliTaz packages. Any addfiles can be copied before
   1.331 +generating the distro.
   1.332 +"
   1.333 +		</label>
   1.334 +	</text>
   1.335 +
   1.336 +	<hbox>
   1.337 +		<text use-markup="true">
   1.338 +			<label>"<b>Flavor name :</b>"</label>
   1.339 +		</text>
   1.340 +		<entry>
   1.341 +			<default>slitaz</default>
   1.342 +			<variable>GEN_LIVEFLAVOR_NAME</variable>
   1.343 +		</entry>
   1.344 +	</hbox>
   1.345 +
   1.346 +	<hbox>
   1.347 +		<button>
   1.348 +			<label>Addfiles</label>
   1.349 +			<input file icon="gtk-open"></input>
   1.350 +			<action>$BIN addfiles_action</action>
   1.351 +		</button>
   1.352 +		<button>
   1.353 +			<label>Gen distro</label>
   1.354 +			<input file icon="forward"></input>
   1.355 +			<action>$BIN gen_liveflavor_action</action>
   1.356 +		</button>
   1.357 +		<button>
   1.358 +			<label>Clean distro</label>
   1.359 +			<input file icon="edit-clear"></input>
   1.360 +			<action>$BIN clean_distro_action</action>
   1.361 +		</button>
   1.362 +	</hbox>
   1.363 +
   1.364 +	</frame>
   1.365 +	
   1.366 +	<frame Community and personal flavors>
   1.367 +	
   1.368 +	<text wrap="true" width-chars="60" use-markup="true">
   1.369 +		<label>
   1.370 +"
   1.371 +Get and build preconfigured flavors from the community. The list of 
   1.372 +flavors can be recharged from the SliTaz mirror. Some addfiles can 
   1.373 +be copied before generating the distro.
   1.374 +"
   1.375 +		</label>
   1.376 +	</text>
   1.377 +
   1.378 +	<hbox>
   1.379 +		<text use-markup="true">
   1.380 +			<label>"<b>Flavor :</b>"</label>
   1.381 +		</text>
   1.382 +		<entry>
   1.383 +			<default>core</default>
   1.384 +			<variable>COMMUNITY_FLAVOR</variable>
   1.385 +		</entry>
   1.386 +		<button>
   1.387 +			<label>List flavors</label>
   1.388 +			<input file icon="media-cdrom"></input>
   1.389 +			<action type="launch">LIST_FLAVORS_BOX</action>
   1.390 +		</button>
   1.391 +	</hbox>
   1.392 +
   1.393 +	<hbox>
   1.394 +		<button>
   1.395 +			<label>Get flavor</label>
   1.396 +			<input file icon="forward"></input>
   1.397 +			<action>$BIN get_flavor_action</action>
   1.398 +		</button>
   1.399 +		<button>
   1.400 +			<label>Addfiles</label>
   1.401 +			<input file icon="gtk-open"></input>
   1.402 +			<action>$BIN addfiles_action</action>
   1.403 +		</button>
   1.404 +		<button>
   1.405 +			<label>Gen distro</label>
   1.406 +			<input file icon="forward"></input>
   1.407 +			<action>$BIN gen_distro_action</action>
   1.408 +		</button>
   1.409 +		<button>
   1.410 +			<label>Clean distro</label>
   1.411 +			<input file icon="edit-clear"></input>
   1.412 +			<action>$BIN clean_distro_action</action>
   1.413 +		</button>
   1.414 +	</hbox>
   1.415 +
   1.416 +	</frame>
   1.417 +	<frame Generate a flavor>
   1.418 +
   1.419 +	<text wrap="true" width-chars="60" use-markup="true">
   1.420 +		<label>
   1.421 +"
   1.422 +Gen Flavor will generate a new flavor file based on a rootfs in 
   1.423 +/home/slitaz/distro. All addfiles will be included in the flavor file.
   1.424 +"
   1.425 +		</label>
   1.426 +	</text>
   1.427 +
   1.428 +	<hbox>
   1.429 +		<text use-markup="true">
   1.430 +			<label>"<b>New flavor :</b>"</label>
   1.431 +		</text>
   1.432 +		<entry>
   1.433 +			<default>slitaz</default>
   1.434 +			<variable>GEN_FLAVOR_NAME</variable>
   1.435 +		</entry>
   1.436 +	</hbox>
   1.437 +	
   1.438 +	<hbox>
   1.439 +		<button>
   1.440 +			<label>Addfiles</label>
   1.441 +			<input file icon="gtk-open"></input>
   1.442 +			<action>$BIN addfiles_action</action>
   1.443 +		</button>
   1.444 +		<button>
   1.445 +			<label>Gen new flavor</label>
   1.446 +			<input file icon="forward"></input>
   1.447 +			<action>$BIN gen_flavor_action</action>
   1.448 +		</button>
   1.449 +	</hbox>
   1.450 +
   1.451 +	</frame>
   1.452 +	
   1.453 +	<frame Meta ISO image>
   1.454 +
   1.455 +	<vbox>
   1.456 +		<hbox>
   1.457 +			<vbox>
   1.458 +				<text wrap="true" width-chars="33" use-markup="true">
   1.459 +					<label>
   1.460 +"
   1.461 +Combines several ISO flavors like
   1.462 +nested Russian dolls. The amount
   1.463 +of RAM available at startup will be
   1.464 +used to select the utmost one. "
   1.465 +					</label>
   1.466 +				</text>
   1.467 +				<hbox>
   1.468 +					<text use-markup="true">
   1.469 +						<label>"<b>ISO input: </b> "</label>
   1.470 +					</text>
   1.471 +					<entry accept="filename">
   1.472 +						<variable>ISO_IN</variable>
   1.473 +					</entry>
   1.474 +					<button>
   1.475 +						<input file stock="gtk-open"></input>
   1.476 +						<action type="fileselect">ISO_IN</action>
   1.477 +					</button>
   1.478 +				</hbox>
   1.479 +				<hbox>
   1.480 +					<text use-markup="true">
   1.481 +						<label>"<b>RAM needed:</b>  "</label>
   1.482 +					</text>
   1.483 +					<entry>
   1.484 +						<default>128M</default>
   1.485 +						<variable>ISO_RAM</variable>
   1.486 +					</entry>
   1.487 +					<button>
   1.488 +						<input file icon="add"></input>
   1.489 +						<action>$BIN merge_add</action>
   1.490 +						<action>refresh:ISO_ITEM</action>
   1.491 +					</button>
   1.492 +				</hbox>
   1.493 +			</vbox>
   1.494 +			<tree>
   1.495 +				<width>140</width><height>50</height>
   1.496 +				<label>RAM|ISO</label>
   1.497 +				<variable>ISO_ITEM</variable>
   1.498 +				<input>$BIN merge_input</input>
   1.499 +				<action>$BIN merge_del</action>
   1.500 +				<action>refresh:ISO_ITEM</action>
   1.501 +			</tree>
   1.502 +		</hbox>
   1.503 +		<hbox>
   1.504 +			<text use-markup="true">
   1.505 +				<label>"<b>ISO output:</b>"</label>
   1.506 +			</text>
   1.507 +			<entry accept="filename">
   1.508 +				<default>meta.iso</default>
   1.509 +				<variable>ISO_OUT</variable>
   1.510 +			</entry>
   1.511 +			<button>
   1.512 +				<input file icon="go-next"></input>
   1.513 +				<label>"Build ISO"</label>
   1.514 +				<action>$BIN merge_action</action>
   1.515 +			</button>
   1.516 +		</hbox>
   1.517 +	</vbox>
   1.518 +	
   1.519 +	</frame>
   1.520 +	
   1.521 +	<frame Low RAM ISO image>
   1.522 +
   1.523 +	<vbox>
   1.524 +		<hbox>
   1.525 +	<text wrap="true" width-chars="25" use-markup="true">
   1.526 +		<label>
   1.527 +"
   1.528 +Build a Low RAM version
   1.529 +of a SliTaz ISO image.
   1.530 +The root filesystem is
   1.531 +compressed and slower.
   1.532 +"
   1.533 +		</label>
   1.534 +	</text>
   1.535 +
   1.536 +			<vbox>
   1.537 +		<radiobutton>
   1.538 +			<label>The filesystem is always in RAM.</label>
   1.539 +			<variable>LORAM_RAM</variable>
   1.540 +		</radiobutton>
   1.541 +		<radiobutton>
   1.542 +			<label>The filesystem may be on a small CDROM.</label>
   1.543 +			<variable>LORAM_CDROM_SMALL</variable>
   1.544 +		</radiobutton>
   1.545 +		<radiobutton>
   1.546 +			<label>The filesystem may be on a large CDROM.</label>
   1.547 +			<variable>LORAM_CDROM</variable>
   1.548 +		</radiobutton>
   1.549 +			</vbox>
   1.550 +		</hbox>
   1.551 +		<hbox>
   1.552 +			<text use-markup="true">
   1.553 +				<label>"<b>ISO input: </b>"</label>
   1.554 +			</text>
   1.555 +			<entry accept="filename">
   1.556 +				<variable>LORAM_IN</variable>
   1.557 +			</entry>
   1.558 +			<button>
   1.559 +				<input file stock="gtk-open"></input>
   1.560 +				<action type="fileselect">LORAM_IN</action>
   1.561 +			</button>
   1.562 +		</hbox>
   1.563 +		<hbox>
   1.564 +			<text use-markup="true">
   1.565 +				<label>"<b>ISO output:</b>"</label>
   1.566 +			</text>
   1.567 +			<entry accept="filename">
   1.568 +				<default>loram.iso</default>
   1.569 +				<variable>LORAM_OUT</variable>
   1.570 +			</entry>
   1.571 +			<button>
   1.572 +				<input file icon="go-next"></input>
   1.573 +				<label>"Build ISO"</label>
   1.574 +				<action>$BIN loram_action</action>
   1.575 +			</button>
   1.576 +		</hbox>
   1.577 +	</vbox>
   1.578 +	
   1.579 +	</frame>
   1.580 +	
   1.581 +	<frame Flavor config and packages list>
   1.582 +
   1.583 +	<text wrap="true" width-chars="60" use-markup="true">
   1.584 +		<label>
   1.585 +"
   1.586 +Before editing files you must have a flavor description. A distro
   1.587 +script can be used to perform actions into the rootfs before
   1.588 +compression.
   1.589 +"
   1.590 +		</label>
   1.591 +	</text>
   1.592 +
   1.593 +	<hbox>
   1.594 +		<text use-markup="true">
   1.595 +			<label>"<b>Flavor config :</b>"</label>
   1.596 +		</text>
   1.597 +		<entry>
   1.598 +			<default>/home/slitaz/tazlito.conf</default>
   1.599 +			<variable>CONFIG_FILE</variable>
   1.600 +		</entry>
   1.601 +		<button>
   1.602 +			<input file icon="accessories-text-editor"></input>
   1.603 +			<action>editor $CONFIG_FILE</action>
   1.604 +		</button>
   1.605 +	</hbox>
   1.606 +
   1.607 +	<hbox>
   1.608 +		<text use-markup="true">
   1.609 +			<label>"<b>Packages list :</b>"</label>
   1.610 +		</text>
   1.611 +		<entry>
   1.612 +			<default>/home/slitaz/distro-packages.list</default>
   1.613 +			<variable>PKGS_LIST</variable>
   1.614 +		</entry>
   1.615 +		<button>
   1.616 +			<input file icon="accessories-text-editor"></input>
   1.617 +			<action>editor $PKGS_LIST</action>
   1.618 +		</button>
   1.619 +	</hbox>
   1.620 +
   1.621 +	<hbox>
   1.622 +		<text use-markup="true">
   1.623 +			<label>"<b>Distro script :</b> "</label>
   1.624 +		</text>
   1.625 +		<entry>
   1.626 +			<default>/home/slitaz/distro.sh</default>
   1.627 +			<variable>DISTRO_SCRIPT</variable>
   1.628 +		</entry>
   1.629 +		<button>
   1.630 +			<input file icon="accessories-text-editor"></input>
   1.631 +			<action>$BIN edit_distro_script</action>
   1.632 +		</button>
   1.633 +	</hbox>
   1.634 +
   1.635 +	</frame>
   1.636 +
   1.637 +	</notebook>
   1.638 +
   1.639 +	<hbox>
   1.640 +		<button help>
   1.641 +			<input file icon="help-browser"></input>
   1.642 +			<action type="launch">HELP</action>
   1.643 +		</button>
   1.644 +		<button>
   1.645 +			<label>Exit</label>
   1.646 +			<input file icon="exit"></input>
   1.647 +			<action type="exit">Exit</action>
   1.648 +		</button>
   1.649 +	</hbox>
   1.650 +
   1.651 +</vbox>
   1.652 +</window>
   1.653 +'
   1.654 +
   1.655 +case $1 in
   1.656 +	*_*)
   1.657 +		# Exec all functions called by args (must have an underscore).
   1.658 +		$1 ;;
   1.659 +	*)
   1.660 +		# Tazlitobox action.
   1.661 +		check_root
   1.662 +		gtkdialog --center --program=TAZLITO_BOX ;;
   1.663 +esac
   1.664 +
   1.665 +exit 0