]> diplodocus.org Git - nmh/blobdiff - tools/showbuildenv
A-ha! automake has support for tests expected to fail; use that.
[nmh] / tools / showbuildenv
index 686d188bca4a85aa00d08c1579b149fcd6e6fe1d..ac34d076d602de884b30204d66f955dad165c18d 100755 (executable)
@@ -9,10 +9,14 @@
 # This script should *only* report basic information about the build
 # environment, and only that necessary to reproduce the build
 # environment.
 # This script should *only* report basic information about the build
 # environment, and only that necessary to reproduce the build
 # environment.
+#
+# FIXME: Document meaning of script's exit status, if any.
+# It jumps through hoops with `|| true' despite not using `set -e'.
 
 offset () {
 
 offset () {
-    sed -e 's/^/    /'
+    sed -e '/./s/^/    /'
 }
 }
+
 header () {
     echo
     echo $*
 header () {
     echo
     echo $*
@@ -27,15 +31,28 @@ done
 
 header Shell Variables:
 set | sort -d -t= | offset
 
 header Shell Variables:
 set | sort -d -t= | offset
-echo
-
 
 case ${os} in
 
 
 case ${os} in
 
+  Darwin)
+       header Compilers:
+       cc -v 2>&1 | offset
+       echo
+       lex --version | offset
+       echo
+       yacc --version | offset
+       ;;
+
   FreeBSD)
   FreeBSD)
+       header Compilers:
+       cc -v 2>&1 | offset
+
        header Installed packages:
        (pkg info 2>/dev/null | offset) || true
        (pkg_info 2>/dev/null | offset) || true
        ;;
 
        header Installed packages:
        (pkg info 2>/dev/null | offset) || true
        (pkg_info 2>/dev/null | offset) || true
        ;;
 
+    Linux)
+        header Linux distribution:
+        (lsb_release -a 2>&1 | offset) || true
 esac
 esac