diff options
author | Jose V Beneyto <sepen@crux.nu> | 2012-03-05 14:17:31 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2012-03-05 14:17:31 +0100 |
commit | 08320bbdfa14365bddc0355daac68d57416125c2 (patch) | |
tree | 6991186727d30413ae52366db0a5249a6cf2af99 | |
parent | 585615b7cd247c240b7247c3d2966c05d7878f0d (diff) | |
download | prt-utils-08320bbdfa14365bddc0355daac68d57416125c2.tar.gz prt-utils-08320bbdfa14365bddc0355daac68d57416125c2.tar.xz |
oldfiles: use compression-mode defined in pkgmk-conf
-rwxr-xr-x | oldfiles | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -14,6 +14,7 @@ use strict; my %options = %{getoptions(@ARGV)}; my $pkgdir = ""; my $srcdir = ""; +my $compress = "gz"; my %wanted; my %keepme; @@ -34,6 +35,7 @@ open CONFIG, "/etc/pkgmk.conf" or die "Could not open /etc/pkgmk.conf"; while (<CONFIG>) { $srcdir = $1 if m/^PKGMK_SOURCE_DIR="(.*)"\n/; $pkgdir = $1 if m/^PKGMK_PACKAGE_DIR="(.*)"\n/; + $compress = $1 if m/^PKGMK_COMPRESSION_MODE="(.*)"\n/; } close CONFIG; @@ -65,7 +67,7 @@ if ( $options{"-s"} ) { foreach (split('\n', `prt-get printf "%p:%n:%v:%r\n"`)) { my ($path, $name, $version, $release) = split(':', $_, 4); if ( $options{"-p"} ) { - $wanted{$pkgdir}{"$name\#$version-$release.pkg.tar.gz"} = 1; + $wanted{$pkgdir}{"$name\#$version-$release.pkg.tar.$compress"} = 1; } if ( $options{"-s"} ) { open MD5SUMS, "$path/$name/.md5sum" or next; |