ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/setarchitecture.pm
Revision: 1.5
Committed: Fri Mar 26 17:14:15 1999 UTC (26 years, 1 month ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: ProtoEnd, V0_9_6, V0_9_5, V0_9_4, V0_9_3, V0_9_2, V0_9_1, V0_9, V0_8, V0_7, V0_6, V0_5, V0_4, V0_3
Branch point for: V0_9branch
Changes since 1.4: +1 -1 lines
Log Message:
Architecture flag in Sun set correctly

File Contents

# Content
1 # simply set the architecture variable based on uname
2 #
3
4 package setarchitecture;
5 require 5.001;
6 require Exporter;
7 @ISA = qw(Exporter);
8 @EXPORT = qw(setarch);
9
10 # unix systems
11 sub setarch {
12 $uname=`uname -a`;
13 ($OSname, $hostname, $OSversion, @rest) = split / /, $uname;
14 #
15 # SunOS -
16 #
17 if ( $OSname=~SunOS ) {
18 $OSversion=~s/^(.\..)\..*/\1/; #Retain only the first two version digits
19 }
20 # simply set to OS type and version
21 $ENV{SCRAM_ARCH}="${OSname}__${OSversion}";
22 #print "Setting Architecture to $ENV{SCRAM_ARCH}\n";
23 }