From a898762b524ce1e92a2396f36c02aa475c4314f8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 23 Mar 2000 12:20:51 +0000 Subject: no_comment --- genhdlist_cz2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'genhdlist_cz2') 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 "; +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; -- cgit v1.2.1