]> diplodocus.org Git - nmh/blobdiff - tools/showbuildenv
A-ha! automake has support for tests expected to fail; use that.
[nmh] / tools / showbuildenv
index 415c169dad3406d219e9b2b5b2a2541ed83be54f..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.
+#
+# FIXME: Document meaning of script's exit status, if any.
+# It jumps through hoops with `|| true' despite not using `set -e'.
 
 offset () {
-    sed -e 's/^/    /'
+    sed -e '/./s/^/    /'
 }
+
 header () {
     echo
     echo $*
@@ -28,7 +32,6 @@ done
 header Shell Variables:
 set | sort -d -t= | offset
 
-
 case ${os} in
 
   Darwin)
@@ -49,4 +52,7 @@ case ${os} in
        (pkg_info 2>/dev/null | offset) || true
        ;;
 
+    Linux)
+        header Linux distribution:
+        (lsb_release -a 2>&1 | offset) || true
 esac