7 |
|
$found='false'; |
8 |
|
$bold = "\033[1m"; |
9 |
|
$normal = "\033[0m"; |
10 |
< |
@allowed_commands=qw(project build env install version list arch setup); |
10 |
> |
@allowed_commands=qw(project build install version list arch setup); |
11 |
|
|
12 |
|
foreach $command ( @allowed_commands ) { |
13 |
|
if ( $inputcmd=~/^$command\Z/i) { |
20 |
|
} |
21 |
|
|
22 |
|
if ( ! ( $found=~/true/ ) ) { |
23 |
< |
print "scram help\n---------\n"; |
24 |
< |
print "Recognised Commands: \n"; |
23 |
> |
helpheader('Recognised Commands'); |
24 |
|
foreach $command ( @allowed_commands ) { |
25 |
< |
print " ".$command."\n"; |
25 |
> |
print " $bold scram ".$command.$normal."\n"; |
26 |
|
} |
27 |
+ |
print "\n"; |
28 |
+ |
print "Help on individual commands available through\n\n"; |
29 |
+ |
print "$bold scram".$normal." command$bold help $normal\n\n"; |
30 |
|
} |
31 |
|
|
32 |
+ |
sub help_build { |
33 |
+ |
&build; |
34 |
+ |
} |
35 |
|
sub build { |
36 |
|
# is this a based or free release? |
37 |
|
FullEnvInit(); |
78 |
|
BuildClientFile( $ENV{SCRAM_ProjReqsDoc} ); |
79 |
|
use Cwd; |
80 |
|
print "Installation Located at:\n".cwd()."\n"; |
76 |
– |
ReturnToContinue(); |
81 |
|
} |
82 |
|
|
83 |
|
sub FullEnvInit { |
128 |
|
} while ( ( $thispath=~s/(.*)\/.*/$1/ )=~/./ ); |
129 |
|
if ( ! (defined $ENV{LOCALTOP}) ) { |
130 |
|
print "Unable to locate the top of local release. Exiting\n"; |
127 |
– |
ReturnToContinue(); |
131 |
|
} |
132 |
|
} #end block |
133 |
|
($ENV{THISDIR}=cwd)=~s/^$ENV{LOCALTOP}//; |
170 |
|
my $filename="$ENV{SCRAM_CONFIG}/project.lookup"; |
171 |
|
my $outfile="$ENV{SCRAM_CONFIG}/project.lookup.tmp"; |
172 |
|
open ( LOCALLOOKUPDB, "<$filename" ); |
173 |
< |
open ( OUTFILE , ">$outfile" ); |
173 |
> |
open ( OUTFILE , ">$outfile" ) or die "Unable to open $outfile $!\n"; |
174 |
|
while ( <LOCALLOOKUPDB> ) { |
175 |
|
if ( /^$tagname/ ) { |
176 |
|
print "Related tag :".$_."\n"; |
254 |
|
print "$ENV{SCRAM_ARCH}\n"; |
255 |
|
} |
256 |
|
|
254 |
– |
sub ReturnToContinue { |
255 |
– |
print "Press RETURN to exit\n"; |
256 |
– |
$junk=<STDIN>; |
257 |
– |
} |
257 |
|
|
258 |
|
# |
259 |
|
# Setup a new tool |
285 |
|
sub help_setup { |
286 |
|
|
287 |
|
print <<ENDTEXT; |
288 |
< |
Allows installation of a new tool/external package into an already existing |
289 |
< |
area. |
288 |
> |
Allows installation of a new tool/external package into an already |
289 |
> |
existing area. |
290 |
|
|
291 |
|
Usage: |
292 |
|
|
293 |
< |
scram setup toolname |
293 |
> |
$bold scram setup $normal toolname |
294 |
|
|
295 |
|
toolname : The name of the tool setup file required. |
296 |
|
ENDTEXT |
303 |
|
referenced in the 'project' command by a tag/version combination. |
304 |
|
Usage: (command to be issued from inside an installed project) |
305 |
|
|
306 |
< |
scram install [project_tag [version_tag]] |
306 |
> |
$bold scram install $normal [project_tag [version_tag]] |
307 |
|
|
308 |
|
If not specified the project_tag and version_tag default to the project |
309 |
|
name and version of the installation. |
350 |
|
|
351 |
|
ENDTEXT |
352 |
|
} |
353 |
+ |
|
354 |
+ |
sub help_version { |
355 |
+ |
print <<ENDTEXT; |
356 |
+ |
Print the version number of scram |
357 |
+ |
Usage: |
358 |
+ |
$bold scram version $normal |
359 |
+ |
|
360 |
+ |
ENDTEXT |
361 |
+ |
} |
362 |
+ |
|
363 |
+ |
sub help_arch { |
364 |
+ |
print <<ENDTEXT; |
365 |
+ |
Print out the architecture flag for the current machine. |
366 |
+ |
|
367 |
+ |
Usage: |
368 |
+ |
$bold scram arch $normal |
369 |
+ |
ENDTEXT |
370 |
+ |
} |