diff options
author | Androbin <robin.richtsfeld@gmail.com> | 2017-06-15 00:01:39 +0200 |
---|---|---|
committer | Martin Wicke <martin.wicke@gmail.com> | 2017-06-14 15:18:43 -0700 |
commit | 0d2f6918322c7bf29d1de3075b0d4ed3b1b72919 (patch) | |
tree | 83a39ecd69821025ec221e33f8a0286c2a63d459 /tools | |
parent | da70b83f35f3e2d29a01b36ec865e76063588345 (diff) |
Create tf_env_collect.sh
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/tf_env_collect.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/tf_env_collect.sh b/tools/tf_env_collect.sh index b7b8c25ee4..a1c9c88c58 100755 --- a/tools/tf_env_collect.sh +++ b/tools/tf_env_collect.sh @@ -16,10 +16,20 @@ 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..." 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 |