tazpkg view tazpkgbox-install @ rev 437

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