summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose V Beneyto <sepen@crux.nu>2012-03-05 14:17:31 +0100
committerJuergen Daubert <jue@jue.li>2012-03-05 14:17:31 +0100
commit08320bbdfa14365bddc0355daac68d57416125c2 (patch)
tree6991186727d30413ae52366db0a5249a6cf2af99
parent585615b7cd247c240b7247c3d2966c05d7878f0d (diff)
downloadprt-utils-08320bbdfa14365bddc0355daac68d57416125c2.tar.gz
prt-utils-08320bbdfa14365bddc0355daac68d57416125c2.tar.xz
oldfiles: use compression-mode defined in pkgmk-conf
-rwxr-xr-xoldfiles4
1 files changed, 3 insertions, 1 deletions
diff --git a/oldfiles b/oldfiles
index c59fcfb..15f726d 100755
--- a/oldfiles
+++ b/oldfiles
@@ -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;

Generated by cgit