]> diplodocus.org Git - nmh/blob - tools/showbuildenv
Add new build tool: tools/showbuildenv
[nmh] / tools / showbuildenv
1 #!/bin/sh
2
3 # Print a description of the build environment. This is here mainly
4 # for the use of the buildbot cluster, allowing developers to see the
5 # build environment on machines they can't login on. It also provides
6 # a history in the build logs that might be useful in catching
7 # regressions.
8 #
9 # This script should *only* report basic information about the build
10 # environment, and only that necessary to reproduce the build
11 # environment.
12
13 offset () {
14 sed -e 's/^/ /'
15 }
16 header () {
17 echo
18 echo $*
19 echo
20 }
21
22 os=`uname`
23
24 for i in a m p r s v; do
25 eval uname_${i}=\'$(uname -${i} 2>/dev/null)\'
26 done
27
28 header Shell Variables:
29 set | sort -d -t= | offset
30 echo
31
32
33 case ${os} in
34
35 FreeBSD)
36 header Installed packages:
37 (pkg info 2>/dev/null | offset) || true
38 (pkg_info 2>/dev/null | offset) || true
39 ;;
40
41 esac