wok-6.x rev 688

xarchive*: use slitaz-wrap.sh, remove from System tools
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Apr 25 21:50:15 2008 +0000 (2008-04-25)
parents 7d534380fdad
children 30d14453cdd1
files xarchive-extras/receipt xarchive/receipt xarchive/stuff/slitaz-wrap.sh xarchive/stuff/slitaz-xarchive-wrappers-0.2.8-6.patch
line diff
     1.1 --- a/xarchive-extras/receipt	Fri Apr 25 17:12:21 2008 +0000
     1.2 +++ b/xarchive-extras/receipt	Fri Apr 25 21:50:15 2008 +0000
     1.3 @@ -17,6 +17,9 @@
     1.4  	mkdir -p $fs/usr/lib/xarchive/wrappers
     1.5  	cp -a $_pkg/usr/lib/xarchive/wrappers/* $fs/usr/lib/xarchive/wrappers
     1.6  	rm -f fs/usr/lib/xarchive/wrappers/tar-*
     1.7 +	rm -f fs/usr/lib/xarchive/wrappers/deb-*
     1.8 +	rm -f fs/usr/lib/xarchive/wrappers/rpm-*
     1.9 +	rm -f fs/usr/lib/xarchive/wrappers/zip-*
    1.10  	sed -i 's|#!\s*/bin/bash|#!/bin/sh|' $_pkg/usr/lib/xarchive/wrappers/*
    1.11  }
    1.12  
     2.1 --- a/xarchive/receipt	Fri Apr 25 17:12:21 2008 +0000
     2.2 +++ b/xarchive/receipt	Fri Apr 25 21:50:15 2008 +0000
     2.3 @@ -5,11 +5,9 @@
     2.4  CATEGORY="x-windows"
     2.5  SHORT_DESC="A GTK+ front-end for command line archiving tools."
     2.6  MAINTAINER="Erjo <erjo@slitaz.org>"
     2.7 -DEPENDS=""
     2.8  TARBALL="$PACKAGE-$VERSION.tar.gz"
     2.9  WEB_SITE="http://xarchive.sourceforge.net/"
    2.10 -WGET_URL="http://dfn.dl.sourceforge.net/sourceforge/xarchive/$TARBALL" 
    2.11 -JWM_MENU='Utilities:<Program icon="xarchive.xpm" label="XArchive">xarchive</Program>'
    2.12 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    2.13  
    2.14  # Rules to configure and make the package.ls sr	
    2.15  compile_rules()
    2.16 @@ -30,8 +28,8 @@
    2.17  {
    2.18  	mkdir -p $fs/usr/lib/xarchive/wrappers
    2.19  	cp -a $_pkg/usr/bin $fs/usr
    2.20 -	cp -a $_pkg/usr/lib/xarchive/wrappers/tar-* $fs/usr/lib/xarchive/wrappers
    2.21  	sed -i 's|#!\s*/bin/bash|#!/bin/sh|' $_pkg/usr/lib/xarchive/wrappers/*
    2.22 +	cp stuff/slitaz-wrap.sh $fs/usr/lib/xarchive/wrappers
    2.23  	strip -s $fs/usr/bin/*
    2.24  }
    2.25  
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/xarchive/stuff/slitaz-wrap.sh	Fri Apr 25 21:50:15 2008 +0000
     3.3 @@ -0,0 +1,529 @@
     3.4 +#!/bin/sh
     3.5 +# slitaz-wrap.sh - sh slitaz core wrapper for xarchive frontend
     3.6 +# Copyright (C) 2005 Lee Bigelow <ligelowbee@yahoo.com> 
     3.7 +# Copyright (C) 2008 Pascal Bellard <pascal.bellard@slitaz.org> 
     3.8 +# 
     3.9 +# This program is free software; you can redistribute it and/or modify
    3.10 +# it under the terms of the GNU General Public License as published by
    3.11 +# the Free Software Foundation; either version 2 of the License, or
    3.12 +# (at your option) any later version.
    3.13 +# 
    3.14 +# This program is distributed in the hope that it will be useful,
    3.15 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.16 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.17 +# GNU General Public License for more details.
    3.18 +# 
    3.19 +# You should have received a copy of the GNU General Public License
    3.20 +# along with this program; if not, write to the Free Software
    3.21 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3.22 +
    3.23 +# set up exit status variables
    3.24 +E_UNSUPPORTED=65
    3.25 +
    3.26 +# Supported file extentions for tar 
    3.27 +TAR_EXTS="tar"
    3.28 +GZIP_EXTS="tar.gz tgz"
    3.29 +LZMA_EXTS="tar.lz tar.lzma tlz"
    3.30 +BZIP2_EXTS="tar.bz tbz tar.bz2 tbz2"
    3.31 +COMPRESS_EXTS="tar.z tar.Z"
    3.32 +CPIO_EXTS="cpio"
    3.33 +CPIOGZ_EXTS="cpio.gz"
    3.34 +ZIP_EXTS="zip cbz jar"
    3.35 +RPM_EXTS="rpm"
    3.36 +DEB_EXTS="deb"
    3.37 +TAZPKG_EXTS="tazpkg"
    3.38 +
    3.39 +# Setup awk program
    3.40 +AWK_PROGS="mawk gawk awk"
    3.41 +AWK_PROG=""
    3.42 +for awkprog in $AWK_PROGS; do
    3.43 +    if [ "$(which $awkprog)" ]; then
    3.44 +        AWK_PROG="$awkprog"
    3.45 +        break
    3.46 +    fi
    3.47 +done
    3.48 +
    3.49 +# setup variables opt and archive.
    3.50 +# the shifting will leave the files passed as
    3.51 +# all the remaining args "$@"
    3.52 +opt="$1"
    3.53 +test -z $1 || shift 1
    3.54 +archive="$1"
    3.55 +test -z $1 || shift 1
    3.56 +
    3.57 +# set up compression variables for our compression functions. 
    3.58 +# translate archive name to lower case for pattern matching.
    3.59 +# use compressor -c option to output to stdout and direct it where we want
    3.60 +lc_archive="$(echo $archive|tr [:upper:] [:lower:])"
    3.61 +DECOMPRESS="cat"
    3.62 +COMPRESS="cat"
    3.63 +COMPRESS2=""
    3.64 +TAR_COMPRESS_OPT=""
    3.65 +for ext in $GZIP_EXTS $CPIOGZ_EXTS; do
    3.66 +    if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
    3.67 +        DECOMPRESS="gzip -dc"
    3.68 +        COMPRESS="gzip -c"
    3.69 +        TAR_COMPRESS_OPT="z"
    3.70 +    fi
    3.71 +done
    3.72 +for ext in $BZIP2_EXTS; do
    3.73 +    if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
    3.74 +        DECOMPRESS="bzip2 -dc" 
    3.75 +        COMPRESS="bzip2 -c"
    3.76 +        TAR_COMPRESS_OPT="j"
    3.77 +    fi
    3.78 +done
    3.79 +for ext in $LZMA_EXTS; do
    3.80 +    if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
    3.81 +        DECOMPRESS="unlzma -c" 
    3.82 +        COMPRESS="lzma e"
    3.83 +        COMPRESS2=" -so"
    3.84 +        TAR_COMPRESS_OPT="a"
    3.85 +    fi
    3.86 +done
    3.87 +for ext in $COMPRESS_EXTS; do
    3.88 +    if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
    3.89 +        DECOMPRESS="uncompress -dc" 
    3.90 +        COMPRESS="compress -c"
    3.91 +        TAR_COMPRESS_OPT="--use-compress-prog=compress"
    3.92 +    fi
    3.93 +done
    3.94 +
    3.95 +# Compression functions
    3.96 +decompress_func()
    3.97 +{
    3.98 +    if [ "$DECOMPRESS" ]; then 
    3.99 +        tmpname="$(mktemp -t tartmp.XXXXXX)"
   3.100 +        if [ -f "$archive" ]; then 
   3.101 +            $DECOMPRESS "$archive" > "$tmpname" 
   3.102 +        fi
   3.103 +        # store old name for when we recompress
   3.104 +        oldarch="$archive"
   3.105 +        # change working file to decompressed tmp 
   3.106 +        archive="$tmpname"
   3.107 +    fi
   3.108 +}
   3.109 +
   3.110 +compress_func()
   3.111 +{
   3.112 +    if [ "$COMPRESS" ] && [ "$oldarch" ]; then
   3.113 +        [ -f "$oldarch" ] && rm "$oldarch"
   3.114 +        if $COMPRESS "$archive" $COMPRESS2 > "$oldarch"; then
   3.115 +            rm "$archive"
   3.116 +        fi
   3.117 +    fi
   3.118 +}
   3.119 +
   3.120 +not_busybox()
   3.121 +{
   3.122 +    case "$(readlink $(which $1))" in
   3.123 +    *busybox*) return 1;;
   3.124 +    esac
   3.125 +    return 0
   3.126 +}
   3.127 +
   3.128 +# the option switches
   3.129 +case "$opt" in
   3.130 +    -i) # info: output supported extentions for progs that exist
   3.131 +        for ext in $TAR_EXTS $GZIP_EXTS $BZIP2_EXTS $COMPRESS_EXTS $LZMA_EXTS \
   3.132 +                   $CPIO_EXTS $CPIOGZ_EXTS $ZIP_EXTS $DEB_EXTS $RPM_EXTS \
   3.133 +                   $TAZPKG_EXTS ; do
   3.134 +            printf "%s;" $ext
   3.135 +            if [ "$ext" = "zip" -a ! "$(which zip)" ]; then
   3.136 +                echo warning: zip not found, extract only >/dev/stderr
   3.137 +            fi
   3.138 +            if [ "$ext" = "tar" ] && ! not_busybox tar; then
   3.139 +                echo warning: gnu/tar not found, extract only >/dev/stderr
   3.140 +            fi
   3.141 +        done
   3.142 +        printf "\n"
   3.143 +        exit
   3.144 +        ;;
   3.145 +
   3.146 +    -o) # open: mangle output of tar cmd for xarchive 
   3.147 +        for ext in $TAR_EXTS $GZIP_EXTS $BZIP2_EXTS $COMPRESS_EXTS $LZMA_EXTS; do
   3.148 +        # format of tar output:
   3.149 +# lrwxrwxrwx USR/GRP       0 2005-05-12 00:32:03 file -> /path/to/link
   3.150 +# -rw-r--r-- USR/GRP    6622 2005-04-22 12:29:14 file 
   3.151 +# 1          2          3    4          5        6
   3.152 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.153 +                tar -tv${TAR_COMPRESS_OPT}f "$archive" | $AWK_PROG '
   3.154 +        {
   3.155 +          attr=$1
   3.156 +          split($2,ids,"/") #split up the 2nd field to get uid/gid
   3.157 +          uid=ids[1]
   3.158 +          gid=ids[2]
   3.159 +          size=$3
   3.160 +          date=$4
   3.161 +          time=$5
   3.162 +          
   3.163 +          #this method works with filenames that start with a space (evil!)
   3.164 +          #split line a time and a space
   3.165 +          split($0,linesplit, $5 " ")
   3.166 +          #then split the second item (name&link) at the space arrow space
   3.167 +          split(linesplit[2], nlsplit, " -> ")
   3.168 +
   3.169 +          name=nlsplit[1]
   3.170 +          link=nlsplit[2]
   3.171 +
   3.172 +          if (! link) {link="-"} #if there was no link set it to a dash
   3.173 +
   3.174 +          printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.175 +        }'
   3.176 +                exit
   3.177 +	    fi
   3.178 +        done
   3.179 +
   3.180 +        for ext in $CPIO_EXTS $CPIOGZ_EXTS; do
   3.181 +        # format of cpio output:
   3.182 +# lrwxrwxrwx USR/GRP       0 2005-05-12 00:32:03 file -> /path/to/link
   3.183 +# -rw-r--r-- USR/GRP    6622 2005-04-22 12:29:14 file 
   3.184 +# 1          2          3    4          5        6
   3.185 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.186 +                $DECOMPRESS "$archive" | cpio -tv | $AWK_PROG '
   3.187 +        {
   3.188 +          attr=$1
   3.189 +          split($2,ids,"/") #split up the 2nd field to get uid/gid
   3.190 +          uid=ids[1]
   3.191 +          gid=ids[2]
   3.192 +          size=$3
   3.193 +          date=$4
   3.194 +          time=$5
   3.195 +          
   3.196 +          #this method works with filenames that start with a space (evil!)
   3.197 +          #split line a time and a space
   3.198 +          split($0,linesplit, $5 " ")
   3.199 +          #then split the second item (name&link) at the space arrow space
   3.200 +          split(linesplit[2], nlsplit, " -> ")
   3.201 +
   3.202 +          name=nlsplit[1]
   3.203 +          link=nlsplit[2]
   3.204 +
   3.205 +          if (! link) {link="-"} #if there was no link set it to a dash
   3.206 +
   3.207 +          if (name != "" && uid != "blocks") printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.208 +        }'
   3.209 +                exit
   3.210 +	    fi
   3.211 +        done
   3.212 +
   3.213 +        for ext in $ZIP_EXTS; do
   3.214 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.215 +	        if which zipinfo; then
   3.216 +                    # format of zipinfo -T -s-h- output:
   3.217 +                    # -rw-r--r--  2.3 unx    11512 tx defN YYYYMMDD.HHMMSS file 
   3.218 +                    # 1           2   3      4     5  6    7               8
   3.219 +                    zipinfo -T -s-h-t "$archive" | $AWK_PROG -v uuid=$(id -u -n) '
   3.220 +        {
   3.221 +          attr=$1; size=$4
   3.222 +          
   3.223 +          year=substr($7,1,4)
   3.224 +          month=substr($7,5,2)
   3.225 +          day=substr($7,7,2)
   3.226 +          date=year "-" month "-" day
   3.227 +
   3.228 +          hours=substr($7,10,2)
   3.229 +          mins=substr($7,12,2)
   3.230 +          secs=substr($7,14,2)
   3.231 +          time=hours ":" mins ":" secs
   3.232 +
   3.233 +          uid=uuid; gid=uuid; link="-"
   3.234 +          #split line at the time and a space, second item is our name
   3.235 +          split($0, linesplit, ($7 " "))
   3.236 +          name=linesplit[2]
   3.237 +          printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.238 +        }'            
   3.239 +                    exit
   3.240 +		else
   3.241 +                    # format of unzip -l output:
   3.242 +                    # 6622 2005-04-22 12:29:14 file 
   3.243 +                    # 1    2          3        4
   3.244 +                    unzip -l "$archive" | $AWK_PROG -v uuid=$(id -u -n) '
   3.245 +	BEGIN { n = 0}
   3.246 +        {
   3.247 +	  n=n+1
   3.248 +	  attr=""
   3.249 +          uid=uuid; gid=uuid
   3.250 +          size=$1
   3.251 +          date=$2
   3.252 +          time=$3
   3.253 +          
   3.254 +          #this method works with filenames that start with a space (evil!)
   3.255 +          #split line a time and a space
   3.256 +          split($0,linesplit, $3 "   ")
   3.257 +          #then split the second item (name&link) at the space arrow space
   3.258 +          split(linesplit[2], nlsplit, " -> ")
   3.259 +
   3.260 +          name=nlsplit[1]
   3.261 +          link=nlsplit[2]
   3.262 +
   3.263 +          if (! link) {link="-"} #if there was no link set it to a dash
   3.264 +
   3.265 +          if (name != "" && n > 3) printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.266 +        }'
   3.267 +                    exit
   3.268 +		fi
   3.269 +	    fi
   3.270 +        done
   3.271 +
   3.272 +        for ext in $RPM_EXTS; do
   3.273 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.274 +                rpm2cpio "$archive" | cpio -tv | $AWK_PROG '
   3.275 +        {
   3.276 +          attr=$1
   3.277 +          split($2,ids,"/") #split up the 2nd field to get uid/gid
   3.278 +          uid=ids[1]
   3.279 +          gid=ids[2]
   3.280 +          size=$3
   3.281 +          date=$4
   3.282 +          time=$5
   3.283 +          
   3.284 +          #this method works with filenames that start with a space (evil!)
   3.285 +          #split line a time and a space
   3.286 +          split($0,linesplit, $5 " ")
   3.287 +          #then split the second item (name&link) at the space arrow space
   3.288 +          split(linesplit[2], nlsplit, " -> ")
   3.289 +
   3.290 +          name=substr(nlsplit[1],2)
   3.291 +          link=nlsplit[2]
   3.292 +
   3.293 +          if (! link) {link="-"} #if there was no link set it to a dash
   3.294 +
   3.295 +          if (name != "" && uid != "blocks") printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.296 +        }'
   3.297 +                exit
   3.298 +	    fi
   3.299 +        done
   3.300 +
   3.301 +        for ext in $DEB_EXTS; do
   3.302 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.303 +                dpkg-deb -c "$archive" | $AWK_PROG '
   3.304 +        {
   3.305 +          attr=$1
   3.306 +          split($2,ids,"/") #split up the 2nd field to get uid/gid
   3.307 +          uid=ids[1]
   3.308 +          gid=ids[2]
   3.309 +          size=$3
   3.310 +          date=$4
   3.311 +          time=$5
   3.312 +          
   3.313 +          #this method works with filenames that start with a space (evil!)
   3.314 +          #split line a time and a space
   3.315 +          split($0,linesplit, $5 " ")
   3.316 +          #then split the second item (name&link) at the space arrow space
   3.317 +          split(linesplit[2], nlsplit, " -> ")
   3.318 +
   3.319 +          name=substr(nlsplit[1],2)
   3.320 +          link=nlsplit[2]
   3.321 +
   3.322 +          if (! link) {link="-"} #if there was no link set it to a dash
   3.323 +
   3.324 +          printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.325 +        }'
   3.326 +                exit
   3.327 +	    fi
   3.328 +        done
   3.329 +
   3.330 +        for ext in $TAZPKG_EXTS; do
   3.331 +        # format of cpio output:
   3.332 +# lrwxrwxrwx USR/GRP       0 2005-05-12 00:32:03 file -> /path/to/link
   3.333 +# -rw-r--r-- USR/GRP    6622 2005-04-22 12:29:14 file 
   3.334 +# 1          2          3    4          5        6
   3.335 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.336 +                tmpcpio="$(mktemp -d -t cpiotmp.XXXXXX)"
   3.337 +		here="$(pwd)"
   3.338 +		cd $tmpcpio
   3.339 +		cpio -i fs.cpio.gz > /dev/null < "$archive"
   3.340 +                zcat fs.cpio.gz | cpio -tv | $AWK_PROG '
   3.341 +        {
   3.342 +          attr=$1
   3.343 +          split($2,ids,"/") #split up the 2nd field to get uid/gid
   3.344 +          uid=ids[1]
   3.345 +          gid=ids[2]
   3.346 +          size=$3
   3.347 +          date=$4
   3.348 +          time=$5
   3.349 +          
   3.350 +          #this method works with filenames that start with a space (evil!)
   3.351 +          #split line a time and a space
   3.352 +          split($0,linesplit, $5 " ")
   3.353 +          #then split the second item (name&link) at the space arrow space
   3.354 +          split(linesplit[2], nlsplit, " -> ")
   3.355 +
   3.356 +          name=substr(nlsplit[1],3)
   3.357 +          link=nlsplit[2]
   3.358 +
   3.359 +          if (! link) {link="-"} #if there was no link set it to a dash
   3.360 +
   3.361 +          if (name != "" && uid != "blocks") printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link
   3.362 +        }'
   3.363 +		cd $here
   3.364 +		rm -rf $tmpcpio
   3.365 +                exit
   3.366 +            fi
   3.367 +	done
   3.368 +        exit $E_UNSUPPORTED
   3.369 +        ;;
   3.370 +
   3.371 +    -a) # add to archive passed files
   3.372 +    	not_busybox tar && \
   3.373 +        for ext in $TAR_EXTS $GZIP_EXTS $BZIP2_EXTS $COMPRESS_EXTS $LZMA_EXTS; do
   3.374 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.375 +                # we only want to add the file's basename, not
   3.376 +                # the full path so...
   3.377 +                decompress_func
   3.378 +                while [ "$1" ]; do
   3.379 +                    cd "$(dirname "$1")"
   3.380 +                    tar -rf "$archive" "$(basename "$1")"
   3.381 +                    wrapper_status=$?
   3.382 +                    shift 1
   3.383 +                done
   3.384 +                compress_func
   3.385 +                exit $wrapper_status
   3.386 +	    fi
   3.387 +	done
   3.388 +        which zip >/dev/null && for ext in $ZIP_EXTS; do
   3.389 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.390 +                # we only want to add the file's basename, not
   3.391 +                # the full path so...
   3.392 +                while [ "$1" ]; do
   3.393 +                    cd "$(dirname "$1")"
   3.394 +                    zip -g -r "$archive" "$(basename "$1")"
   3.395 +                    wrapper_status=$?
   3.396 +                    shift 1
   3.397 +                done
   3.398 +                exit $wrapper_status
   3.399 +	    fi
   3.400 +	done
   3.401 +        exit $E_UNSUPPORTED
   3.402 +        ;;
   3.403 +
   3.404 +    -n) # new: create new archive with passed files 
   3.405 +    	not_busybox tar && \
   3.406 +        for ext in $TAR_EXTS $GZIP_EXTS $BZIP2_EXTS $COMPRESS_EXTS $LZMA_EXTS; do
   3.407 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.408 +                # create will only be passed the first file, the
   3.409 +                # rest will be "added" to the new archive
   3.410 +                decompress_func
   3.411 +                cd "$(dirname "$1")"
   3.412 +                tar -cf "$archive" "$(basename "$1")"
   3.413 +                wrapper_status=$?
   3.414 +                compress_func
   3.415 +                exit $wrapper_status
   3.416 +	    fi
   3.417 +	done
   3.418 +        which zip >/dev/null && for ext in $ZIP_EXTS; do
   3.419 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.420 +                # create will only be passed the first file, the
   3.421 +                # rest will be "added" to the new archive
   3.422 +                cd "$(dirname "$1")"
   3.423 +                zip -r "$archive" "$(basename "$1")"
   3.424 +	    fi
   3.425 +	done
   3.426 +        exit $E_UNSUPPORTED
   3.427 +        ;;
   3.428 +
   3.429 +    -r) # remove: from archive passed files 
   3.430 +    	not_busybox tar && \
   3.431 +        for ext in $TAR_EXTS $GZIP_EXTS $BZIP2_EXTS $COMPRESS_EXTS $LZMA_EXTS; do
   3.432 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.433 +                decompress_func
   3.434 +                tar --delete -f "$archive" "$@"
   3.435 +                wrapper_status=$?
   3.436 +                compress_func
   3.437 +                exit $wrapper_status
   3.438 +	    fi
   3.439 +	done
   3.440 +        which zip >/dev/null && for ext in $ZIP_EXTS; do
   3.441 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.442 +                zip -d "$archive" "$@"
   3.443 +	    fi
   3.444 +	done
   3.445 +        exit $E_UNSUPPORTED
   3.446 +        ;;
   3.447 +
   3.448 +    -e) # extract: from archive passed files 
   3.449 +        for ext in $TAR_EXTS $GZIP_EXTS $BZIP2_EXTS $COMPRESS_EXTS $LZMA_EXTS; do
   3.450 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.451 +                # xarchive will put is the right extract dir
   3.452 +                # so we just have to extract.
   3.453 +                tar -x${TAR_COMPRESS_OPT}f "$archive" "$@" 
   3.454 +                exit $?
   3.455 +	    fi
   3.456 +	done
   3.457 +        for ext in $CPIO_EXTS $CPIOGZ_EXTS; do
   3.458 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.459 +	        if [ -n "$1" ]; then
   3.460 +                    while [ "$1" ]; do
   3.461 +                       $DECOMPRESS "$archive" | cpio -idv "$1"
   3.462 +                       shift 1
   3.463 +                    done
   3.464 +		else
   3.465 +                    $DECOMPRESS "$archive" | cpio -idv
   3.466 +		fi
   3.467 +                exit $?
   3.468 +	    fi
   3.469 +        done
   3.470 +        for ext in $ZIP_EXTS; do
   3.471 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.472 +                # xarchive will put is the right extract dir
   3.473 +                # so we just have to extract.
   3.474 +                unzip -n "$archive" "$@"
   3.475 +                exit $?
   3.476 +	    fi
   3.477 +	done
   3.478 +        for ext in $RPM_EXTS; do
   3.479 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.480 +	        if [ -n "$1" ]; then
   3.481 +                    while [ "$1" ]; do
   3.482 +                       rpm2cpio "$archive" | cpio -idv "$1"
   3.483 +                       shift 1
   3.484 +                    done
   3.485 +		else
   3.486 +                    rpm2cpio "$archive" | cpio -idv
   3.487 +		fi
   3.488 +                exit $?
   3.489 +	    fi
   3.490 +        done
   3.491 +
   3.492 +        for ext in $DEB_EXTS; do
   3.493 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.494 +                dpkg-deb -X "$archive" "$@"
   3.495 +                exit $?
   3.496 +	    fi
   3.497 +	done
   3.498 +        for ext in $TAZPKG_EXTS; do
   3.499 +            if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then
   3.500 +                tmpcpio="$(mktemp -d -t cpiotmp.XXXXXX)"
   3.501 +		here="$(pwd)"
   3.502 +		cd $tmpcpio
   3.503 +		cpio -i < "$archive" > /dev/null
   3.504 +		zcat fs.cpio.gz | cpio -id > /dev/null
   3.505 +                status=$?
   3.506 +	        if [ -n "$1" ]; then
   3.507 +                    while [ "$1" ]; do
   3.508 +		        dir=$(dirname "$here/$1")
   3.509 +			mkdir -p "$dir" 2> /dev/null
   3.510 +		        mv "fs/$1" "$dir" 2> /dev/null
   3.511 +		    done
   3.512 +		else
   3.513 +		    mv fs/* fs/.* $here 2> /dev/null
   3.514 +		fi
   3.515 +		cd $here
   3.516 +		rm -rf $tmpcpio
   3.517 +		exit $status
   3.518 +	    fi
   3.519 +	done
   3.520 +        exit $E_UNSUPPORTED
   3.521 +        ;;
   3.522 +
   3.523 +     *) echo "error, option $opt not supported"
   3.524 +        echo "use one of these:" 
   3.525 +        echo "-i                #info" 
   3.526 +        echo "-o archive        #open" 
   3.527 +        echo "-a archive files  #add" 
   3.528 +        echo "-n archive file   #new" 
   3.529 +        echo "-r archive files  #remove" 
   3.530 +        echo "-e archive files  #extract" 
   3.531 +        exit
   3.532 +esac
     4.1 --- a/xarchive/stuff/slitaz-xarchive-wrappers-0.2.8-6.patch	Fri Apr 25 17:12:21 2008 +0000
     4.2 +++ b/xarchive/stuff/slitaz-xarchive-wrappers-0.2.8-6.patch	Fri Apr 25 21:50:15 2008 +0000
     4.3 @@ -666,3 +666,14 @@
     4.4   
     4.5   # Command line options for prog functions
     4.6   
     4.7 +--- xarchive-0.2.8-6/xarchive.desktop.src	
     4.8 ++++ xarchive-0.2.8-6/xarchive.desktop.src	
     4.9 +@@ -12,7 +12,7 @@
    4.10 + Comment[en_GB]=Create, modify and browse an archive
    4.11 + GenericName=Archive Manager
    4.12 + 
    4.13 +-Categories=Gtk;Application;System;Utility;
    4.14 ++Categories=Gtk;Utility;
    4.15 + Exec=xarchive %F
    4.16 + Icon=/path/to/icons/xarchive.xpm
    4.17 + StartupNotify=true