diff options
author | Mark Wielaard <mwielaard@redhat.com> | 2008-08-08 13:29:55 +0200 |
---|---|---|
committer | Mark Wielaard <mwielaard@redhat.com> | 2008-08-08 13:29:55 +0200 |
commit | 551a4f58263d6ce961658ba3b3d461c2f5046cb0 (patch) | |
tree | e5c0bda844498b21d898289de71628bb0c15a61a /testsuite/systemtap.examples/examples-index-gen.pl | |
parent | d6ff6e8c48f1d6bd1304fb5d23bcb8f6e35db6cd (diff) | |
download | systemtap-steved-551a4f58263d6ce961658ba3b3d461c2f5046cb0.tar.gz systemtap-steved-551a4f58263d6ce961658ba3b3d461c2f5046cb0.tar.xz systemtap-steved-551a4f58263d6ce961658ba3b3d461c2f5046cb0.zip |
Make sure examples indexes are always generated in builddir.
Diffstat (limited to 'testsuite/systemtap.examples/examples-index-gen.pl')
-rw-r--r-- | testsuite/systemtap.examples/examples-index-gen.pl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/testsuite/systemtap.examples/examples-index-gen.pl b/testsuite/systemtap.examples/examples-index-gen.pl index 8e968159..726df973 100644 --- a/testsuite/systemtap.examples/examples-index-gen.pl +++ b/testsuite/systemtap.examples/examples-index-gen.pl @@ -10,6 +10,7 @@ use strict; use warnings; +use Cwd 'abs_path'; use File::Copy; use File::Find; use File::Path; @@ -21,6 +22,7 @@ if ($#ARGV >= 0) { } else { $inputdir = "."; } +$inputdir = abs_path($inputdir); my $outputdir; if ($#ARGV >= 1) { @@ -28,6 +30,7 @@ if ($#ARGV >= 1) { } else { $outputdir = $inputdir; } +$outputdir = abs_path($outputdir); my %scripts = (); print "Parsing .meta files in $inputdir...\n"; @@ -198,17 +201,21 @@ close (KEYINDEX); close (KEYHTML); my @supportfiles - = ("systemtapcorner.gif", - "systemtap.css", - "systemtaplogo.png"); + = ("html/systemtapcorner.gif", + "html/systemtap.css", + "html/systemtaplogo.png", + "README"); if ($inputdir ne $outputdir) { my $file; print "Copying support files...\n"; + if (! -d "$outputdir/html") { + mkpath("$outputdir/html", 1, 0711); + } foreach $file (@supportfiles) { my $orig = "$inputdir/$file"; my $dest = "$outputdir/$file"; print "Copying $file to $dest...\n"; - copy("$orig", $dest) or die "$file cannot be copied to $dest, $!"; + copy($orig, $dest) or die "$file cannot be copied to $dest, $!"; } } |