chiark / gitweb /
lsd
[ian-dotfiles.git] / config
diff --git a/config b/config
index 34a0e56eadad4ff816b483e211b78fe084495049..34c9607734cbec74f2cc7a1f666321b8f81d03e6 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]);
@@ -21,6 +22,10 @@ if ($uname =~ m/^Linux$/) {
     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";
 } elsif ($uname =~ m/^HP\-UX/) {
     chomp($_= `uname -r`); $? and die "platform $?";
     m/^B\.(\d+\.\d+)$/ or die "$_ ?";