tazpkg diff tazpkgbox @ rev 139

rename save-config to repack-config, add list-config, update tazpkgbox
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 28 09:20:59 2008 +0000 (2008-07-28)
parents 3ad89c4852fb
children a954c610e384
line diff
     1.1 --- a/tazpkgbox	Fri Jul 18 14:14:13 2008 +0000
     1.2 +++ b/tazpkgbox	Mon Jul 28 09:20:59 2008 +0000
     1.3 @@ -19,6 +19,20 @@
     1.4  	tazpkg >/dev/null
     1.5  fi
     1.6  
     1.7 +if [ "$1" == "call" ]; then
     1.8 +	case "$2" in
     1.9 +	list_config_files)
    1.10 +		tazpkg list-config | awk '
    1.11 +BEGIN { ls=0 } {
    1.12 +  if (/^===/) ls=1-ls;
    1.13 +  else if (ls) system("stat -c \"%A|%U|%G|%s|%n\" " $0);
    1.14 +}'
    1.15 +		exit 0;;
    1.16 +	*) echo "Invalid argument";;
    1.17 +	esac
    1.18 +	exit 1
    1.19 +fi
    1.20 +
    1.21  # Tmp dir and files used to get pkgs infos on the fly. Clean also
    1.22  # list and search files to load less data and have a faster start.
    1.23  mkdir -p /tmp/tazpkgbox
    1.24 @@ -72,6 +86,24 @@
    1.25  </window>
    1.26  '
    1.27  
    1.28 +export LIST_CONFIG_FILES="
    1.29 +<window title=\"configuration files\" icon-name=\"system-file-manager\">
    1.30 +  <vbox>
    1.31 +	<tree>
    1.32 +		<width>600</width><height>160</height>
    1.33 +		<label>Access | User | Group | Size | Name</label>
    1.34 +		<input> $0 call list_config_files </input>
    1.35 +	</tree>
    1.36 +	<hbox>
    1.37 +		<button>
    1.38 +			<input file icon=\"gtk-close\"></input>
    1.39 +			<action type=\"closewindow\">INSTALLED_PACKAGE_ACTIONS</action>
    1.40 +		</button>
    1.41 +	</hbox>
    1.42 +  </vbox>
    1.43 +</window>
    1.44 +"
    1.45 +
    1.46  # Main dialog
    1.47  export TAZPKG_DIALOG='
    1.48  <window title="SliTaz Packages Manager" icon-name="package-x-generic">
    1.49 @@ -324,7 +356,7 @@
    1.50  				</button>
    1.51  			</hbox>
    1.52  		</frame>
    1.53 -		<frame Files path and packages check>
    1.54 +		<frame Files path, configuration files and packages check>
    1.55  			<hbox>
    1.56  				<text use-markup="true" width-chars="60">
    1.57  					<label>
    1.58 @@ -334,6 +366,16 @@
    1.59  			</hbox>
    1.60  			<hbox>
    1.61  				<button>
    1.62 +					<label>Repack config</label>
    1.63 +					<input file icon="edit-redo"></input>
    1.64 +					<action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -T "Repack configs" -geometry 80x25+120+120 -e "tazpkg repack-config ; sleep 2" 2> /dev/null</action>
    1.65 +				</button>
    1.66 +				<button>
    1.67 +					<label>Config Files</label>
    1.68 +					<input file icon="tazpkg"></input>
    1.69 +					<action type="launch">LIST_CONFIG_FILES</action>
    1.70 +				</button>
    1.71 +				<button>
    1.72  					<label>Quick check</label>
    1.73  					<input file icon="go-next"></input>
    1.74  					<action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -T "Check packages (q to quit)" -geometry 80x25+120+120 -e "tazpkg check | less " 2> /dev/null</action>