aboutsummaryrefslogtreecommitdiffstats
path: root/genhdlist_cz2
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-23 12:20:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-23 12:20:51 +0000
commita898762b524ce1e92a2396f36c02aa475c4314f8 (patch)
tree9eb71ad491489b1e2f225f1f85500c2e0c6c9eef /genhdlist_cz2
parent116f5db5c2339c9526735df960b4dbc52ee78568 (diff)
downloadrpmtools-a898762b524ce1e92a2396f36c02aa475c4314f8.tar
rpmtools-a898762b524ce1e92a2396f36c02aa475c4314f8.tar.gz
rpmtools-a898762b524ce1e92a2396f36c02aa475c4314f8.tar.bz2
rpmtools-a898762b524ce1e92a2396f36c02aa475c4314f8.tar.xz
rpmtools-a898762b524ce1e92a2396f36c02aa475c4314f8.zip
no_comment
Diffstat (limited to 'genhdlist_cz2')
-rw-r--r--genhdlist_cz212
1 files changed, 9 insertions, 3 deletions
diff --git a/genhdlist_cz2 b/genhdlist_cz2
index 7512d68..de3e317 100644
--- a/genhdlist_cz2
+++ b/genhdlist_cz2
@@ -10,15 +10,21 @@ $hdlist && @ARGV == 1 || $root && @ARGV == 0 or die
or genhdlist_cz2 [--noclean] --distrib <root distrib>
";
+chop($pwd = `pwd`);
+
if ($root) {
+ $root = "$pwd/$root" if $root !~ m|^/|;
$depslist = "$root/Mandrake/base/depslist.ordered";
- $hdlist = "$root/Mandrake/base/hdlist.cz2";
- $dir = "$root/Mandrake/RPMS";
+ $hdlist = "$root/Mandrake/base/hdlist.cz2";
+ $dir = "$root/Mandrake/RPMS";
$ENV{PATH} = "$ENV{PATH}:$root/misc";
} else {
($dir) = @ARGV;
}
+$depslist = "$pwd/$depslist" if $depslist !~ m|^/|;
+$hdlist = "$pwd/$hdlist" if $hdlist !~ m|^/|;
+$dir = "$pwd/$dir" if $dir !~ m|^/|;
$work_dir = "/tmp/.build_hdlist";
@@ -44,7 +50,7 @@ if (-e $depslist) {
@keys = grep { delete $keys{$_} } @keys;
open B, "| build_archive $hdlist 400000";
-print B "$_\n" foreach @keys, keys %keys;
+foreach (@keys, keys %keys) { print B "$_\n" }
close B or die "build_archive failed\n";
system("rm -rf $work_dir") unless $noclean;