X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2f2e3e508d9128961087abbe206ddd951e6b9d62..60d6f8e0407f578bef9f3392afa1283f97152c60:/tools/showbuildenv diff --git a/tools/showbuildenv b/tools/showbuildenv index 686d188b..ac34d076 100755 --- a/tools/showbuildenv +++ b/tools/showbuildenv @@ -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 $* @@ -27,15 +31,28 @@ done header Shell Variables: set | sort -d -t= | offset -echo - case ${os} in + Darwin) + header Compilers: + cc -v 2>&1 | offset + echo + lex --version | offset + echo + yacc --version | offset + ;; + 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 ;; + Linux) + header Linux distribution: + (lsb_release -a 2>&1 | offset) || true esac