make gen_template.pl work from anywhere with FindBin
git-svn-id: svn://10.0.0.236/trunk@214975 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -10,17 +10,17 @@
|
||||
# perl gen_template.pl -b 345876 -type xul
|
||||
#
|
||||
# sends a test case template for bug 345876 to stdout
|
||||
|
||||
use FindBin;
|
||||
use Getopt::Long;
|
||||
GetOptions("b=i"=> \$bug_number,
|
||||
"type:s"=> \$template_type);
|
||||
|
||||
if ($template_type eq "xul") {
|
||||
$template_type = "static/xul.template.txt";
|
||||
$template_type = "$FindBin::RealBin/static/xul.template.txt";
|
||||
} elsif ($template_type eq "xhtml") {
|
||||
$template_type = "static/xhtml.template.txt";
|
||||
$template_type = "$FindBin::RealBin/static/xhtml.template.txt";
|
||||
} else {
|
||||
$template_type = "static/test.template.txt";
|
||||
$template_type = "$FindBin::RealBin/static/test.template.txt";
|
||||
}
|
||||
|
||||
open(IN,$template_type) or die("Failed to open myfile for reading.");
|
||||
|
||||
Reference in New Issue
Block a user