1 |
williamc |
1.1 |
#!/usr/local/bin/perl5
|
2 |
|
|
#
|
3 |
|
|
# SCRAM Installation Script
|
4 |
|
|
#
|
5 |
|
|
# To be run from the Installation directory
|
6 |
|
|
#
|
7 |
|
|
|
8 |
|
|
use Cwd;
|
9 |
|
|
$thisdir=cwd();
|
10 |
|
|
(($basedir=$thisdir)=~s/(.*)\/.*/\1/);
|
11 |
|
|
($topdir=$basedir)=~s/(.*)\/.*/\1/;
|
12 |
|
|
|
13 |
|
|
# Copy the wrapper file with the correct base variable installed
|
14 |
|
|
open ( WRAP , "<scramwrapper") or die "Unable to open scramwrapper $!";
|
15 |
|
|
open ( OUTFILE , ">$topdir/scram") or die "Unable to open $topdir/scram $!";
|
16 |
|
|
while ( <WRAP> ) {
|
17 |
|
|
$_=~s/__basedir__/$basedir/g;
|
18 |
|
|
print OUTFILE $_;
|
19 |
|
|
}
|
20 |
|
|
close WRAP;
|