Skip to content

Commit

Permalink
Create tf_env_collect.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Androbin authored and martinwicke committed Jun 14, 2017
1 parent da70b83 commit 0d2f691
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/tf_env_collect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d2f691

Please sign in to comment.