tazpkg view tazpkgbox-install @ rev 359
Add default button in search box (thanks Frederic Guilbault)
author | Antoine Bodin <gokhlayeh@mailoo.org> |
---|---|
date | Tue Sep 28 00:40:34 2010 +0200 (2010-09-28) |
parents | |
children | f1d05bd96d7f |
line source
1 #!/bin/sh
2 #
3 # GTKdialog interface to SliTaz Packages Manager aka Tazpkg. Notes:
4 # Notebook tab 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