Create tf_env_collect.sh

This commit is contained in:
Androbin 2017-06-15 00:01:39 +02:00 committed by Martin Wicke
parent da70b83f35
commit 0d2f691832

View File

@ -16,10 +16,20 @@
set -u # Check for undefined variables set -u # Check for undefined variables
die() {
# Print a message and exit with code 1.
#
# Usage: die <error_message>
# e.g., die "Something bad happened."
echo $@
exit 1
}
echo "Collecting system information..." echo "Collecting system information..."
OUTPUT_FILE=tf_env.txt OUTPUT_FILE=tf_env.txt
python_bin_path=$(which python || which python3 || true) python_bin_path=$(which python || which python3 || die "Cannot find Python binary")
{ {
echo echo