File: dump-environment.sh

package info (click to toggle)
rust-cargo 0.86.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,088 kB
  • sloc: javascript: 408; sh: 306; python: 87; xml: 21; makefile: 6
file content (22 lines) | stat: -rwxr-xr-x 391 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# This script dumps information about the build environment to stdout.

set -euo pipefail
IFS=$'\n\t'

echo "environment variables:"
printenv | sort
echo

echo "disk usage:"
df -h
echo

echo "CPU info:"
if [[ "${OSTYPE}" = "darwin"* ]]; then
    system_profiler SPHardwareDataType || true
    sysctl hw || true
else
    cat /proc/cpuinfo || true
    cat /proc/meminfo || true
fi