tazpkg annotate tazpkgbox-install @ rev 426

tazpkg: extend convert .opkg support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 01 18:42:38 2011 +0100 (2011-03-01)
parents
children f1d05bd96d7f
rev   line source
erjo@352 1 #!/bin/sh
erjo@352 2 #
erjo@352 3 # GTKdialog interface to SliTaz Packages Manager aka Tazpkg. Notes:
erjo@352 4 # Notebook tab are vbox, tabs are used to indent and functions are
erjo@352 5 # split and found in $LIB.
erjo@352 6 #
erjo@352 7 # (C) GNU gpl v3 - SliTaz GNU/Linux 2010.
erjo@352 8 #
erjo@352 9 VERSION=1.0
erjo@352 10
erjo@352 11 export PKG="$@"
erjo@352 12 export PKG_SHORT_NAME=$(basename $PKG)
erjo@352 13
erjo@352 14
erjo@352 15 # Tazpkgbox is only for root.
erjo@352 16 if test $(id -u) != 0 ; then
erjo@352 17 exec subox tazpkgbox-install $PKG
erjo@352 18 exit 0
erjo@352 19 fi
erjo@352 20
erjo@352 21
erjo@352 22
erjo@352 23 # English/French help dialog.
erjo@352 24 export MAIN_DIALOG="
erjo@352 25 <window title=\"Tazpkg install\" icon-name=\"tazpkg\">
erjo@352 26 <vbox>
erjo@352 27 <text use-markup=\"true\" width-chars=\"54\">
erjo@352 28 <label>\"
erjo@352 29 Package <b>$PKG_SHORT_NAME</b> will be installed\"
erjo@352 30 </label>
erjo@352 31 </text>
erjo@352 32 <hbox>
erjo@352 33 <button ok>
erjo@352 34 <action>xterm -T \"Install package \" -geometry 80x16+120+120 -e \"tazpkg install $PKG; sleep 2\"</action>
erjo@352 35 <action type=\"closewindow\">\"\"</action>
erjo@352 36 </button>
erjo@352 37 <button cancel>
erjo@352 38 <action type=\"closewindow\">HELP</action>
erjo@352 39 </button>
erjo@352 40 </hbox>
erjo@352 41 </vbox>
erjo@352 42 </window>
erjo@352 43 "
erjo@352 44
erjo@352 45 gtkdialog --center --program=MAIN_DIALOG >/dev/null
erjo@352 46
erjo@352 47 exit 0