Revision: | 1.1 |
Committed: | Mon Mar 1 10:36:21 1999 UTC (26 years, 2 months ago) by williamc |
Content type: | text/plain |
Branch: | MAIN |
Log Message: | Utility modules |
# | User | Rev | Content |
---|---|---|---|
1 | williamc | 1.1 | #!/usr/local/bin/perl5 |
2 | # | ||
3 | # simply set the architecture variable based on uname | ||
4 | # | ||
5 | |||
6 | package setarchitecture; | ||
7 | require Exporter; | ||
8 | @ISA = qw(Exporter); | ||
9 | @EXPORT = qw(setarch); | ||
10 | |||
11 | # unix systems | ||
12 | sub setarch { | ||
13 | $uname=`uname -a`; | ||
14 | ($OSname, $hostname, $OSversion, @rest) = split / /, $uname; | ||
15 | # simply set to OS type and version | ||
16 | $ENV{SCRAM_ARCH}="${OSname}__${OSversion}"; | ||
17 | print "Setting Architecture to $ENV{SCRAM_ARCH}\n"; | ||
18 | } |