slitaz-tools view tinyutils/burnbox @ rev 136

bootfloppybox: add memtest and etherboot with grub
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 09 20:08:43 2008 +0000 (2008-04-09)
parents 0ae81ea9ef1a
children efbcba5c4e8d
line source
1 #! /bin/sh
2 #
3 # Gtkdialog box to burn ISO images using Wodim with basic options.
4 # - SliTaz GNU/Linux 2008.
5 #
6 VERSION=20080114
8 # Burn/wodim dialog box. Sleep a bit with progress bar to let user cancel
9 # ISO burning and exit when finished.
10 #
11 export BURN_DIALOG='
12 <window title="Burnbox working" icon-name="dialog-warning">
13 <vbox>
14 <text use-markup="true" width-chars="28">
15 <label>
16 "
17 <b>Burnbox working</b>
18 "
19 </label>
20 </text>
21 <progressbar>
22 <label>Please wait...</label>
23 <input>for i in 15 30 45; do echo $i; sleep 1; done; echo "Burning ISO..."; wodim speed=$SPEED dev=$DEVICE $OPTIONS $ISO_IMAGE >/dev/null; echo "Done..."; for i in 60 75 90; do echo $i; sleep 1; done; echo 100</input>
24 <action type="exit">Burned</action>
25 </progressbar>
26 </vbox>
27 </window>
28 '
30 # We need at least devive, speed and ISO image path.
31 #
32 export MOUNT_DIALOG='
33 <window title="Burnbox" icon-name="drive-optical">
34 <vbox>
36 <text use-markup="true">
37 <label>
38 "
39 <b>SliTaz - Burnbox</b>"
40 </label>
41 </text>
42 <text wrap="true" width-chars="54" use-markup="true">
43 <label>
44 "
45 Burn ISO images to CD or DVD writer using Wodim from cdrkit.
46 Please verify device writer setting, add options if wanted or
47 needed and select an ISO image file. Note : You can manipulate
48 ISO images with ISO Master utility.
49 "
50 </label>
51 </text>
53 <frame Configuration>
54 <hbox>
55 <text use-markup="true">
56 <label>"<b>Device :</b>"</label>
57 </text>
58 <entry>
59 <default>/dev/cdrom</default>
60 <variable>DEVICE</variable>
61 </entry>
62 </hbox>
63 <hbox>
64 <text use-markup="true">
65 <label>"<b>Speed :</b>"</label>
66 </text>
67 <entry>
68 <input>cat /proc/sys/dev/cdrom/info | grep "drive speed" | cut -f 3</input>
69 <variable>SPEED</variable>
70 </entry>
71 </hbox>
72 <hbox>
73 <text use-markup="true">
74 <label>"<b>Options :</b>"</label>
75 </text>
76 <entry>
77 <default>-eject -multi</default>
78 <variable>OPTIONS</variable>
79 </entry>
80 </hbox>
81 </frame>
83 <frame ISO image>
84 <hbox>
85 <text use-markup="true">
86 <label>"<b>File :</b>"</label>
87 </text>
88 <entry>
89 <variable>ISO_IMAGE</variable>
90 </entry>
91 <button>
92 <input file stock="gtk-cdrom"></input>
93 <action type="fileselect">ISO_IMAGE</action>
94 </button>
95 </hbox>
96 </frame>
98 <hbox>
99 <button>
100 <label>Burn</label>
101 <input file icon="forward"></input>
102 <action>echo "Burning $ISO_IMAGE..."</action>
103 <action>gtkdialog --program=BURN_DIALOG</action>
104 </button>
105 <button>
106 <input file icon="exit"></input>
107 <action type="exit">Exit</action>
108 </button>
109 </hbox>
111 </vbox>
112 </window>
113 '
115 # Execute main dialog.
116 gtkdialog --program=MOUNT_DIALOG
118 exit 0