зеркало из https://github.com/mozilla/gecko-dev.git
make gen_template.pl work from anywhere with FindBin
This commit is contained in:
Родитель
d79f5d0afa
Коммит
d856eb528c
|
@ -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.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче