diff options
author | Richard Hansen <rhansen@rhansen.org> | 2016-01-23 02:42:39 -0500 |
---|---|---|
committer | Richard Hansen <rhansen@rhansen.org> | 2016-01-31 16:12:55 -0500 |
commit | 867fe2f8dee092e4034ea32b51eb960bcf585aa3 (patch) | |
tree | cfaeffeceefeb77738b5fa0c5554cc5ff26d049d /tools | |
parent | 7c0e443437ef11c878cd2443751e8d2fc3598704 (diff) | |
download | gitlab-867fe2f8dee092e4034ea32b51eb960bcf585aa3.tar.gz |
use the log functions for errors and status messages
This causes the error messages to go to standard error, and it makes
it easy to prefix all log messages if desired.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build_test_env.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh index b71e1bc..aeb199f 100755 --- a/tools/build_test_env.sh +++ b/tools/build_test_env.sh @@ -29,14 +29,14 @@ PY_VER=2 while getopts :p: opt "$@"; do case $opt in p) PY_VER=$OPTARG;; - *) echo "Unknown option: $opt"; exit 1;; + *) fatal "Unknown option: $opt";; esac done case $PY_VER in 2) VENV_CMD=virtualenv;; 3) VENV_CMD=pyvenv;; - *) echo "Wrong python version (2 or 3)"; exit 1;; + *) fatal "Wrong python version (2 or 3)";; esac VENV=$(pwd)/.venv @@ -63,7 +63,7 @@ GREEN='\033[0;32m' NC='\033[0m' OK="echo -e ${GREEN}OK${NC}" -echo -n "Waiting for gitlab to come online... " +log "Waiting for gitlab to come online... " I=0 while :; do sleep 5 @@ -73,7 +73,6 @@ while :; do [ $I -eq 120 ] && exit 1 done sleep 5 -$OK # Get the token TOKEN=$(curl -s http://localhost:8080/api/v3/session \ @@ -92,8 +91,8 @@ url = http://localhost:8080 private_token = $TOKEN EOF -echo "Config file content ($CONFIG):" -cat $CONFIG +log "Config file content ($CONFIG):" +log <$CONFIG $VENV_CMD $VENV . $VENV/bin/activate |