ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/scram
(Generate patch)

Comparing COMP/SCRAM/src/scram (file contents):
Revision 1.3 by williamc, Mon Mar 1 11:18:31 1999 UTC vs.
Revision 1.11 by williamc, Tue Mar 23 12:34:35 1999 UTC

# Line 1 | Line 1
1 < #!/usr/local/bin/perl5 -I$ENV{SCRAM_HOME}/src
1 > #!/usr/local/bin/perl5
2   #
3   # User Interface
4   #
# Line 23 | Line 23 | sub build {
23          # is this a based or free release?
24          FullEnvInit();
25          use BuildSetup;
26 +        $ENV{MAKETARGETS}=join ' ',@ARGV;
27          BuildSetup($ENV{THISDIR},@ARGV);
28   #       system("$ENV{TOOL_HOME}/BuildSetup",$ENV{THISDIR},@ARGV);
29   }
30  
31   sub project {
32 +        # process options
33 +        while ( $ARGV[0]=~"^-" ) {
34 +         if ( (shift @ARGV)=~/-d/ ) {  #installation area directory
35 +          chdir $ARGV[0];
36 +          shift @ARGV;
37 +         }
38 +        }
39          my $project=shift @ARGV;
40          my $version=shift @ARGV;
41          environmentinit();
42          use File::Copy;
43          use Utilities::AddDir;
44          
37           print "Warning : - you are entering a development zone.".
38                " Don't complain if it don't work\n";
45             use BootStrapProject;
46             # get the bootstrap files downloaded
47             BootStrapProject("$project\?\?$version");
# Line 48 | Line 54 | sub project {
54             #
55             foreach $key ( keys %ENV ) {
56                  if ( $key=~/^INT/ ) {
57 <                        adddir($ENV{$key});
57 >                        AddDir::adddir($ENV{$key});
58                  }
59             }
60 +           if ( ! -e "$ENV{LOCALTOP}/$ENV{projconfigdir}" ) {
61 +                system("cp", "-r", "$ENV{RELEASETOP}/$ENV{projconfigdir}",
62 +                                "$ENV{LOCALTOP}/$ENV{projconfigdir}");
63 +           }
64             use clientfile;
65             BuildClientFile( $ENV{SCRAM_ProjReqsDoc} );
66 +           use Cwd;
67 +           print "Installation Located at:\n".cwd()."\n";
68 +           ReturnToContinue();
69   }
70 +
71   sub FullEnvInit {
72      environmentinit();
73      localtop();
# Line 66 | Line 80 | sub environmentinit {
80          my $value;
81  
82          $ENV{LatestBuildFile}=""; # stop recursive behaviour in make
83 <        setarch();
83 >        setarchitecture::setarch();
84          $ENV{INTwork}="tmp/$ENV{SCRAM_ARCH}";
85          $ENV{INTlib}="lib/$ENV{SCRAM_ARCH}";
86          $ENV{INTsrc}="src";
# Line 74 | Line 88 | sub environmentinit {
88          $ENV{INTlog}="logs";
89  
90          if ( ! ( exists $ENV{SCRAM_HOME}) ){
91 <         $ENV{SCRAM_HOME}="/afs/cern.ch/user/w/williamc/public/ConfigMan";
91 >         $ENV{SCRAM_HOME}="/afs/cern.ch/cms/Releases";
92           print "Warning : Environment Variable SCRAM_HOME not set.\n";
93           print "Defaulting to $ENV{SCRAM_HOME}\n";
94          }
# Line 82 | Line 96 | sub environmentinit {
96                  $ENV{SCRAM_CONFIG}="$ENV{SCRAM_HOME}/configuration";
97          }
98          if ( ! ( exists $ENV{TOOL_HOME} ) ){
99 <                $ENV{TOOL_HOME}="$ENV{SCRAM_HOME}/toolbox";
99 >                $ENV{TOOL_HOME}="$ENV{SCRAM_HOME}/src";
100          }
101          if ( ! ( exists $ENV{SCRAM_LOOKUPDB} ) ){
102                  $ENV{SCRAM_LOOKUPDB}="$ENV{SCRAM_CONFIG}/project.lookup";
# Line 102 | Line 116 | sub localtop {
116          } while ( ( $thispath=~s/(.*)\/.*/$1/ )=~/./  );
117          if ( ! (defined $ENV{LOCALTOP}) ) {
118           print "Unable to locate the top of local release. Exiting\n";
119 <         exit 1
119 >         ReturnToContinue();
120          }
121          } #end block
122          ($ENV{THISDIR}=cwd)=~s/^$ENV{LOCALTOP}//;
# Line 230 | Line 244 | sub arch {
244          &environmentinit();
245          print "$ENV{SCRAM_ARCH}\n";
246   }
247 +
248 + sub ReturnToContinue {
249 +           print "Press RETURN to exit\n";
250 +           $junk=<STDIN>;
251 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines