tazusb diff oldstuff/tazusbbox/tazusbbox @ rev 170
Add linux64 support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Dec 03 13:30:45 2014 +0100 (2014-12-03) |
parents | 688c74298d3f |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/oldstuff/tazusbbox/tazusbbox Wed Dec 03 13:30:45 2014 +0100 1.3 @@ -0,0 +1,113 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# Tiny GTKdialog interface to SliTaz Live USB tool aka TazUSB. 1.7 +# 1.8 +# (c) 2010 SliTaz GNU/Linux - GNU gpl v3 1.9 +# 1.10 + 1.11 +# TazUSBbox is only for root. 1.12 +if test $(id -u) != 0 ; then 1.13 + exec subox tazusbbox 1.14 + exit 0 1.15 +fi 1.16 + 1.17 +# Include gettext helper script. 1.18 +. /usr/bin/gettext.sh 1.19 + 1.20 +# Export package name for gettext. 1.21 +TEXTDOMAIN='tazusbbox' 1.22 +export TEXTDOMAIN 1.23 + 1.24 +# $BIN for functions. 1.25 +export BIN=$0 1.26 + 1.27 +# Functions 1.28 + 1.29 +gen_live() 1.30 +{ 1.31 + [ -z "$DEVICE" ] && exit 0 1.32 + if [ -n "$ISO_IMAGE" ]; then 1.33 + xterm -T "Tazusb gen-iso2usb" \ 1.34 + -geometry 80x16 \ 1.35 + -e "tazusb gen-iso2usb $ISO_IMAGE $DEVICE; exit 0" 1.36 + else 1.37 + xterm -T "Tazusb gen-liveusb" \ 1.38 + -geometry 80x16 \ 1.39 + -e "tazusb gen-liveusb $DEVICE; exit 0" 1.40 + fi 1.41 +} 1.42 + 1.43 +box() 1.44 +{ 1.45 + MAIN_DIALOG=' 1.46 +<window title="'`gettext "TazUSB Box"`'" icon-name="media-flash"> 1.47 +<vbox> 1.48 + 1.49 + <text width-chars="60"> 1.50 + <label>"'`gettext " 1.51 +Generate SliTaz LiveUSB media and boot in RAM! Insert a LiveCD into 1.52 +the cdrom drive, select the correct device and press Generate. 1.53 +"`'"</label> 1.54 + </text> 1.55 + 1.56 + <frame '`gettext "ISO to USB (Optional default is CDROM)"`'> 1.57 + <hbox> 1.58 + <text use-markup="true"> 1.59 + <label>"'`gettext "<b>ISO image:</b>"`'"</label> 1.60 + </text> 1.61 + <entry accept="filename"> 1.62 + <variable>ISO_IMAGE</variable> 1.63 + </entry> 1.64 + <button> 1.65 + <input file icon="tazlito"></input> 1.66 + <action type="fileselect">ISO_IMAGE</action> 1.67 + </button> 1.68 + </hbox> 1.69 + </frame> 1.70 + 1.71 + <hbox> 1.72 + <text use-markup="true"> 1.73 + <label>"'`gettext "<b>USB Media:</b>"`'"</label> 1.74 + </text> 1.75 + <combobox> 1.76 + <variable>DEVICE</variable>' 1.77 + if [ -d /proc/scsi/usb-storage ]; then 1.78 + MAIN_DIALOG=${MAIN_DIALOG}" 1.79 + <item></item>" 1.80 + for i in `blkid | cut -d ":" -f 1`; do 1.81 + MAIN_DIALOG=${MAIN_DIALOG}" 1.82 + <item>$i</item>" 1.83 + done 1.84 + else 1.85 + MAIN_DIALOG=${MAIN_DIALOG}' 1.86 + <item>'`gettext "Not found"`'</item>' 1.87 + fi 1.88 + export MAIN_DIALOG=${MAIN_DIALOG}' 1.89 + </combobox> 1.90 + </hbox> 1.91 + <hbox> 1.92 + <button> 1.93 + <label>'`gettext "Generate"`'</label> 1.94 + <input file icon="forward"></input> 1.95 + <action>$BIN gen_live</action> 1.96 + <action>clear:ISO_IMAGE</action> 1.97 + </button> 1.98 + <button> 1.99 + <label>'`gettext "Exit"`'</label> 1.100 + <input file icon="exit"></input> 1.101 + <action type="exit">exit</action> 1.102 + </button> 1.103 + </hbox> 1.104 + 1.105 +</vbox> 1.106 +</window>' 1.107 + gtkdialog --center --program=MAIN_DIALOG #>/dev/null 1.108 +} 1.109 + 1.110 +if [ -n "$1" ]; then 1.111 + $1 1.112 +else 1.113 + box 1.114 +fi 1.115 + 1.116 +exit 0