tazpkg view tazpkgbox-install @ rev 521

tazpkg: Fixed the 'can't cd to .' errors again. Using 2>/dev/null to PACKAGE_DIR to stop the error.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Aug 08 19:21:29 2011 +0000 (2011-08-08)
parents f1d05bd96d7f
children
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 #
10 export PKG="$@"
11 export PKG_SHORT_NAME=$(basename $PKG)
14 # Tazpkgbox is only for root.
15 if test $(id -u) != 0 ; then
16 exec subox tazpkgbox-install $PKG
17 exit 0
18 fi
22 # English/French help dialog.
23 export MAIN_DIALOG="
24 <window title=\"Tazpkg install\" icon-name=\"tazpkg\">
25 <vbox>
26 <text use-markup=\"true\" width-chars=\"54\">
27 <label>\"
28 Package <b>$PKG_SHORT_NAME</b> will be installed\"
29 </label>
30 </text>
31 <hbox>
32 <button ok>
33 <action>xterm -T \"Install package \" -geometry 80x16+120+120 -e \"tazpkg install $PKG; sleep 2\"</action>
34 <action type=\"closewindow\">\"\"</action>
35 </button>
36 <button cancel>
37 <action type=\"closewindow\">HELP</action>
38 </button>
39 </hbox>
40 </vbox>
41 </window>
42 "
44 gtkdialog --center --program=MAIN_DIALOG >/dev/null
46 exit 0