docs: fix previous extract.pl commit
authorStefan Kost <ensonic@users.sf.net>
Fri, 3 Dec 2010 10:23:27 +0000 (12:23 +0200)
committerStefan Kost <ensonic@users.sf.net>
Fri, 3 Dec 2010 10:24:42 +0000 (12:24 +0200)
Make it also work in the srcdir=builddir case again.

tests/examples/manual/extract.pl

index 9726c94..a4b7c1c 100755 (executable)
@@ -29,10 +29,17 @@ xml_decode ($)
 
 # main
 my $output = shift @ARGV;
+my $outputname;
 
 # strip path parts
-$output =~ m/.*\/(.*)$/;
-my $outputname = $1;
+if ($output =~ m/.*\/(.*)$/)
+{
+  $outputname = $1;
+}
+else
+{
+  $outputname = $output;
+}
 
 $found = 0;
 %blocks = ();