ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/setarchitecture.pm
Revision: 1.5.2.1
Committed: Thu May 6 08:06:27 1999 UTC (26 years ago) by williamc
Content type: text/plain
Branch: V0_9branch
CVS Tags: V0_10_16, V0_10_15, V0_10_14, V0_10_13, V0_10_12, V0_10_11, V0_10_10, V0_10_9, V0_10_8, V0_10_7, V0_10_6, V0_10_5, V0_10_4, V0_10_3, V0_10_2, V0_10_1, V0_10_0, V0_10_0beta, V0_9_42, V0_9_41, V0_9_40, V0_9_39, V0_9_38, V0_9_37, V0_9_36, V0_9_35, V0_9_34, V0_9_33, V0_9_32, V0_9_31, V0_9_30, V0_9_29, V0_9_28, V0_9_27, V0_9_26, V0_9_25, V0_9_24, V0_9_23, V0_9_22, V0_9_21, V0_9_20, V0_9_19, V0_9_18, V0_9_17, V0_9_16, V0_9_15, V0_9_14, V0_9_13, V0_9_12, V0_9_11, V0_9_10, V0_9_9, V0_9_8, V0_9_7
Changes since 1.5: +7 -0 lines
Log Message:
Linux Architecture - remove bug fix version

File Contents

# User Rev Content
1 williamc 1.1 # simply set the architecture variable based on uname
2     #
3    
4     package setarchitecture;
5 williamc 1.2 require 5.001;
6 williamc 1.1 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 williamc 1.3 #
15     # SunOS -
16     #
17     if ( $OSname=~SunOS ) {
18 williamc 1.5 $OSversion=~s/^(.\..)\..*/\1/; #Retain only the first two version digits
19 williamc 1.3 }
20 williamc 1.5.2.1 #
21     # Linux -
22     #
23     if ( $OSname=~Linux ) {
24     $OSversion=~s/^(.\..)\..*/\1/; #Retain only the first two version digits
25     }
26    
27 williamc 1.1 # simply set to OS type and version
28     $ENV{SCRAM_ARCH}="${OSname}__${OSversion}";
29 williamc 1.4 #print "Setting Architecture to $ENV{SCRAM_ARCH}\n";
30 williamc 1.1 }