tazlito view tazlitobox @ rev 87

Fix typos
author Julien Rabier <taziden@slitaz.org>
date Wed Dec 10 02:05:48 2008 +0100 (2008-12-10)
parents e4edfca36bc0
children 5509085f8542
line source
1 #! /bin/sh
2 #
3 # Gtkdialog box for Tazlito - SliTaz Live Tool.
4 #
5 VERSION=20080306
7 # Check if user is root.
8 check_root()
9 {
10 if test $(id -u) != 0 ; then
11 echo -e "
12 You must be root to run `basename $0`. Please type 'su' and
13 root password to become super-user.\n"
14 exit 0
15 fi
16 }
18 # By default we go in the flavors dir to download or gen flavors.
19 cd_flavors()
20 {
21 mkdir -p /home/slitaz/flavors
22 cd /home/slitaz/flavors
23 }
25 export HELP='
26 <window title="Tazlito Box - Help" icon-name="media-cdrom">
27 <vbox>
28 <text use-markup="true">
29 <label>"
30 <b>Tazlito Box - Help</b>"
31 </label>
32 </text>
34 <frame Overview>
35 <text wrap="true" width-chars="52" use-markup="true">
36 <label>
37 "
38 Tazlito Box is a tiny interface to SliTaz Live Tool aka Tazlito.
39 You can simply generate a LiveCD in a few minutes, using your
40 own flavor or one from the SliTaz community. Tazlito can also
41 generate a LiveCD flavor using all the current installed packages
42 selection. Tazlito commands are executed in a XTerm, you can
43 then press ENTER or the mouse to close the window.
44 "
45 </label>
46 </text>
47 </frame>
49 <frame Default paths>
50 <text wrap="true" width-chars="50" use-markup="true">
51 <label>
52 "
53 Distro : /home/slitaz/distro
54 Flavors : /home/slitaz/flavors
55 Packages : /home/slitaz/packages
56 "
57 </label>
58 </text>
59 </frame>
61 <hbox>
62 <button>
63 <input file icon="exit"></input>
64 <action type="closewindow">HELP</action>
65 </button>
66 </hbox>
68 </vbox>
69 </window>
70 '
72 # Execute tazlito commands in a XTerm.
73 #
74 export MAIN_DIALOG='
75 <window title="Tazlito Box" icon-name="media-cdrom">
76 <vbox>
78 <text use-markup="true">
79 <label>
80 "
81 <b>SliTaz Live Tool Box</b>"
82 </label>
83 </text>
84 <text wrap="true" width-chars="54" use-markup="true">
85 <label>
86 "
87 Generate a LiveCD flavor with Tazlito.
88 "
89 </label>
90 </text>
92 <notebook labels="System|Flavors|Configuration files">
94 <frame Current packages selection>
96 <text use-markup="true">
97 <label>
98 "
99 Gen distro will create a LiveCD with all installed packages.
100 "
101 </label>
102 </text>
104 <hbox>
105 <button>
106 <label>Gen running distro</label>
107 <input file icon="forward"></input>
108 <action>cd /home/slitaz</action>
109 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "gen-distro" -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close"</action>
110 </button>
111 <button>
112 <label>Clean distro</label>
113 <input file icon="edit-clear"></input>
114 <action>cd /home/slitaz</action>
115 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "clean-distro" -e "tazlito clean-distro && sleep 1"</action>
116 </button>
117 </hbox>
119 <hbox>
120 <text use-markup="true">
121 <label>"<b>New flavor :</b>"</label>
122 </text>
123 <entry>
124 <default>home-made</default>
125 <variable>GEN_FLAVOR_NAME</variable>
126 </entry>
127 </hbox>
128 <hbox>
129 <button>
130 <label>Gen flavor</label>
131 <input file icon="forward"></input>
132 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "gen-flavor $GEN_FLAVOR_NAME" -e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"</action>
133 </button>
134 </hbox>
135 </frame>
137 <frame Community and personnal flavors>
138 <text wrap="true" use-markup="true">
139 <label>
140 "
141 Flavors list can be recharged from SliTaz mirror.
142 "
143 </label>
144 </text>
146 <hbox>
147 <text use-markup="true">
148 <label>"<b>Flavor :</b>"</label>
149 </text>
150 <entry>
151 <default>core</default>
152 <variable>COMMUNITY_FLAVOR</variable>
153 </entry>
154 </hbox>
156 <hbox>
157 <button>
158 <label>List flavors</label>
159 <input file icon="media-cdrom"></input>
160 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "list-flavors" -e "tazlito list-flavors && echo -e \"----\nENTER to continue...\" && read close"</action>
161 </button>
162 <button>
163 <label>Recharge list</label>
164 <input file icon="reload"></input>
165 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "list-flavors --recharge" -e "tazlito list-flavors --recharge && echo -e \"----\nENTER to continue...\" && read close"</action>
166 </button>
167 </hbox>
169 <hbox>
170 <button>
171 <label>Get flavor</label>
172 <input file icon="forward"></input>
173 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "get-flavor $COMMUNITY_FLAVOR" -e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close"</action>
174 </button>
175 <button>
176 <label>Gen flavor distro</label>
177 <input file icon="forward"></input>
178 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "gen-distro" -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close"</action>
179 </button>
180 <button>
181 <label>Clean distro</label>
182 <input file icon="edit-clear"></input>
183 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "clean-distro" -e "tazlito clean-distro && sleep 1"</action>
184 </button>
185 </hbox>
186 </frame>
188 <frame Flavor config and packages list>
189 <text wrap="true" use-markup="true">
190 <label>
191 "
192 Before editing files you must have a flavor description.
193 "
194 </label>
195 </text>
197 <hbox>
198 <text use-markup="true">
199 <label>"<b>Flavor config :</b>"</label>
200 </text>
201 <entry>
202 <default>/home/slitaz/flavors/tazlito.conf</default>
203 <variable>CONFIG_FILE</variable>
204 </entry>
205 <button>
206 <input file icon="accessories-text-editor"></input>
207 <action>leafpad $CONFIG_FILE</action>
208 </button>
209 </hbox>
211 <hbox>
212 <text use-markup="true">
213 <label>"<b>Packages list :</b>"</label>
214 </text>
215 <entry>
216 <default>/home/slitaz/flavors/distro-packages.list</default>
217 <variable>PKGS_LIST</variable&