1 |
williamc |
1.2 |
#!/usr/local/bin/perl5
|
2 |
williamc |
1.1 |
# Wrap the main scram progrm
|
3 |
|
|
# Set up any system varibales required and process arguments
|
4 |
|
|
# immediateley after scram
|
5 |
|
|
|
6 |
|
|
$re='false';
|
7 |
williamc |
1.2 |
@args=@ARGV;
|
8 |
|
|
foreach $arg ( @args ) {
|
9 |
|
|
$arg eq "-re" ) { # Always request a User Return to exit the program
|
10 |
williamc |
1.1 |
$re="true";
|
11 |
|
|
}
|
12 |
|
|
}
|
13 |
|
|
|
14 |
|
|
# -- If not already set then point to current version
|
15 |
|
|
if ( $ENV{SCRAM_HOME} eq "" ) {
|
16 |
|
|
$ENV{SCRAM_HOME}="__basedir__";
|
17 |
|
|
}
|
18 |
|
|
|
19 |
|
|
# -- Always set PERL5LIB to run scram specific modules
|
20 |
|
|
$ENV{PERL5LIB}="$ENV{SCRAM_HOME}/src";
|
21 |
|
|
$ret= system("$ENV{SCRAM_HOME}/src/scram", @ARGV);
|
22 |
|
|
|
23 |
|
|
# -- Dont just exit- ask the user first if -re option specified
|
24 |
|
|
if ( $re eq 'true' ) {
|
25 |
|
|
print "\nPress RETURN to exit\n";
|
26 |
|
|
$junk=<STDIN>;
|
27 |
|
|
}
|