Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=dcdbd3d5d9e93badebb949646e52777edeacb39b

commit dcdbd3d5d9e93badebb949646e52777edeacb39b
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Sat Oct 30 02:10:42 2010 +0200

updatesync: switch to xz

diff --git a/scripts/updatesync b/scripts/updatesync
index 324866a..146ef53 100755
--- a/scripts/updatesync
+++ b/scripts/updatesync
@@ -266,7 +266,14 @@ fi
bdb=`basename $pkgdb`
udb=`basename $bdb .fdb`.tar
echo "updatesync: uncompressing to $ustmpdir..." >&2
-bunzip2 -c -d $pkgdb > $udb || die "error uncompressing $pkgdb"
+format=`file -i $pkgdb |sed 's/.*: \(.*\);.*/\1/'`
+if [ "$format" == "application/x-bzip2" ]; then
+       bunzip2 -c -d $pkgdb > $udb || die "error uncompressing $pkgdb"
+elif [ "$format" == "application/x-xz" ]; then
+       xz -c -d $pkgdb > $udb || die "error uncompressing $pkgdb"
+else
+       die "unsupported package format: $format"
+fi
if [ "$action" = "upd" ]; then
# INSERT / UPDATE
delete_entry $option
@@ -329,7 +336,7 @@ fi

echo "updatesync: compressing to $bdb..." >&2
cd $ustmpdir
-bzip2 -c $udb >$bdb || die "error writing to $bdb"
+xz -c $udb >$bdb || die "error writing to $bdb"
mv $bdb $pkgdb || die "error moving $bdb to $pkgdb"

cd $curdir
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to