On Mon, Jun 13, 2005 at 05:43:45PM +0200, Bill Allombert wrote: > On Mon, Jun 13, 2005 at 12:20:36AM +0200, Bill Allombert wrote: > > Probably a more robust way to find the name of the directory is in > > order. Given you unpack in an empty tempdirr, you could just use > > readdir to find the name of the directory created. > > Here a patch that implement this suggestion. [...] > --- /usr/bin/debdiff 2005-03-24 15:33:37.000000000 +0100 > +++ /home/bill/bin/debdiff 2005-06-13 17:41:34.000000000 +0200 > @@ -378,12 +378,12 @@ > mktmpdirs(); > for my $i (1,2) { > no strict 'refs'; > - my $cmd = qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i]); > - ${"sdir$i"} = `$cmd`; > + system qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i] >/dev/null); > fatal qq(cd ${"dir$i"} && dpkg-source -x $dscs[$i] failed) > if $? != 0; > - ${"sdir$i"} =~ /([^\s]*)$/; > - ${"sdir$i"} = $1; > + opendir DIR,${"dir$i"}; > + ${"sdir$i"} = (readdir(DIR))[3]; > + closedir(DIR);
I had to use [2] instead to make this work for me. Might want to be more robust again and look for the first directory entry that has the right form of name ... -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]