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 |
# | 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 | # |
21 | # Linux - |
22 | # |
23 | if ( $OSname=~Linux ) { |
24 | $OSversion=~s/^(.\..)\..*/\1/; #Retain only the first two version digits |
25 | } |
26 | |
27 | # simply set to OS type and version |
28 | if ( ! defined $ENV{SCRAM_ARCH} ) { |
29 | $ENV{SCRAM_ARCH}="${OSname}__${OSversion}"; |
30 | } |
31 | #print "Setting Architecture to $ENV{SCRAM_ARCH}\n"; |
32 | } |