chiark / gitweb /
Bomb if platform not recognised. Do not test $! after pclose. SunOS platform.
[ian-dotfiles.git] / config
diff --git a/config b/config
index d9d49e651058ab534de54114c0cc2148219bfe81..bed6412082a90b6014c32d1bdefccc4a78da86db 100644 (file)
--- a/config
+++ b/config
@@ -2,14 +2,20 @@
 chomp($hostname= `uname -n`); $? and die 'uname $?';
 ($hostname)=(gethostbyname $hostname) or die "hostname $hostname ?";
 
-chomp($s= `uname`); $? and die 'platform $?';
+chomp($s= `uname`); $? and die "platform $?";
 if ($s =~ m/^Linux$/) {
-    chomp($_= `uname -m`); $? and die 'platform $?';
+    chomp($_= `uname -m`); $? and die "platform $?";
     if (m/^i\d86/) {
        $platform= 'linux-i386';
     } else {
-       die '$_ ?';
+       die "$_ ?";
     }
+} elsif ($s =~ m/^SunOS$/) {
+    chomp($_= `uname -r`); $? and die "platform $?";
+    m/^\d+\.\d+/ or die "$_ ?";
+    $platform= "SunOS$&";
+} else {
+    die "$s ?";
 }
 
 $ncipher= $hostname =~ m/\.ncipher\.com$/ ? 'cam' :