chiark
/
gitweb
/
~ian
/
ian-dotfiles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gcc; #gr
[ian-dotfiles.git]
/
config
diff --git
a/config
b/config
index 34a0e56eadad4ff816b483e211b78fe084495049..d618ababab8e3ac8cbfd99c17e6bef28217abe82 100644
(file)
--- a/
config
+++ b/
config
@@
-1,5
+1,6
@@
@@-
@@-
-chomp($nodename= `uname -n`); $? and die 'uname $?';
+chomp($nodename= `uname -n`); $? and die "uname $?";
+chomp($username= `whoami`); $? and die "whoami $?";
@he= gethostbyname $nodename or die "gethostbyname $nodename ?";
@hostnames= ($he[0], split /\s/, $he[1]);
@he= gethostbyname $nodename or die "gethostbyname $nodename ?";
@hostnames= ($he[0], split /\s/, $he[1]);
@@
-21,10
+22,19
@@
if ($uname =~ m/^Linux$/) {
m/^\d+\.\d+/ or die "$_ ?";
$platform= "SunOS$&";
$xbindir= '/usr/openwin/bin';
m/^\d+\.\d+/ or die "$_ ?";
$platform= "SunOS$&";
$xbindir= '/usr/openwin/bin';
+} elsif ($uname =~ m/^FreeBSD/) {
+ chomp($_= `uname -r`); $? and die "platform $?";
+ m/^(\d+\.\d+)\-/ or die "$_ ?";
+ $platform= "FreeBSD-$1";
+ $xbindir= '/usr/X11R6/bin';
} elsif ($uname =~ m/^HP\-UX/) {
chomp($_= `uname -r`); $? and die "platform $?";
m/^B\.(\d+\.\d+)$/ or die "$_ ?";
$platform= "HP-UX$1";
} elsif ($uname =~ m/^HP\-UX/) {
chomp($_= `uname -r`); $? and die "platform $?";
m/^B\.(\d+\.\d+)$/ or die "$_ ?";
$platform= "HP-UX$1";
+} elsif ($uname =~ m/^AIX/) {
+ chomp($_= `uname -rv`); $? and die "platform $?";
+ m/^\d+ (\d+)$/ or die "$_ ?";
+ $platform= "AIX$1";
} else {
die "$uname ?";
}
} else {
die "$uname ?";
}
@@
-33,5
+43,7
@@
$ncipher= $hostname =~ m/\.(ncipher\.com$)/ ? 'cam' :
$hostname =~ m/\.(ncipherusa\.com$)/ ? 'bos' :
0;
$hostname =~ m/\.(ncipherusa\.com$)/ ? 'bos' :
0;
+$chiark= $hostname =~ m/chiark/;
+
%ncipherdom= ('cam' => 'ncipher.com',
'bos' => 'ncipherusa.com');
%ncipherdom= ('cam' => 'ncipher.com',
'bos' => 'ncipherusa.com');