ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/setarchitecture.pm
Revision: 1.6
Committed: Mon Aug 28 08:35:17 2000 UTC (24 years, 8 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V_18_3_TEST, VO_18_3, V0_18_2, V0_18_1
Branch point for: V0_19_4_B
Changes since 1.5: +9 -0 lines
Log Message:
remove Interface.pm

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.6 #
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 williamc 1.6 if ( ! defined $ENV{SCRAM_ARCH} ) {
29 williamc 1.1 $ENV{SCRAM_ARCH}="${OSname}__${OSversion}";
30 williamc 1.6 }
31 williamc 1.4 #print "Setting Architecture to $ENV{SCRAM_ARCH}\n";
32 williamc 1.1 }