ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/Installation/scramwrapper
Revision: 1.1.2.4.2.1
Committed: Tue Aug 22 17:42:26 2000 UTC (24 years, 8 months ago) by williamc
Branch: HPWbranch
CVS Tags: BuildSystemProto1, V0_18_0, V0_18_0model, V0_17_1, V0_18_0alpha, V0_17_0, V0_16_4, V0_16_3, V0_16_2, V0_16_1, V0_16_0, V0_15_1, V0_15_0, V0_15_0beta
Branch point for: V0_17branch, V0_16branch, V0_15branch
Changes since 1.1.2.4: +7 -2 lines
Log Message:
Allow for changes to perl executable

File Contents

# Content
1 #!__perlexe__
2 # Wrap the main scram program
3 # Set up any system varibales required and process arguments
4 # immediateley after scram
5
6 $re='false';
7 @args=@ARGV;
8 for ( my $i=0; $i<=$#args; $i++ ) {
9 if ( $args[$i] eq "-re" ) { #Always request a User Return to exit the program
10 $re="true";
11 # cut it out of argument list passed down
12 splice(@args,$i,1);
13 }
14 }
15
16 # -- If not already set then point to current version
17 if ( $ENV{SCRAM_HOME} eq "" ) {
18 $ENV{SCRAM_HOME}="__basedir__";
19 }
20
21 # -- The perl executable
22 if ( $ENV{SCRAMPERL} eq "" ) {
23 $ENV{SCRAMPERL}="__perlexe__";
24 }
25
26 # -- Always set PERL5LIB to run scram specific modules
27 $ENV{PERL5LIB}="$ENV{SCRAM_HOME}/src";
28 my $ret=system("$ENV{SCRAMPERL}","$ENV{SCRAM_HOME}/src/scram", @args);
29
30 # -- Dont just exit- ask the user first if -re option specified
31 if ( $re eq 'true' ) {
32 print "\nPress RETURN to exit\n";
33 $junk=<STDIN>;
34 }
35 exit $ret/256;