Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added colored error messages.

  • Loading branch information...
commit 27e1dd1c7dbab377696f34534358e5d3a21d747a 1 parent 5220b8e
Jim Brusstar authored

Showing 1 changed file with 15 additions and 3 deletions. Show diff stats Hide diff stats

  1. +15 3 srctool
18 srctool
@@ -20,7 +20,7 @@ action_install() {
20 20 echo yes | $SCRIPT_PATH/hldsupdatetool.bin > /dev/null
21 21 if [[ $? != 0 ]]
22 22 then
23   - echo "ERROR: Hldsupdatetool.bin exited abnormally. Exiting..."
  23 + print_error "Hldsupdatetool.bin exited abnormally."
24 24 exit 1
25 25 fi
26 26
@@ -38,11 +38,23 @@ action_install() {
38 38 done
39 39 if [[ $INDEX == $RETRY ]]
40 40 then
41   - echo "ERROR: Steam failed after $RETRY retries. Exiting..."
  41 + print_error "Steam failed after $RETRY retries."
42 42 exit 1
43 43 fi
44 44
45   - echo "[ DONE ]"
  45 + print_done
  46 +}
  47 +
  48 +print_done() {
  49 + GREEN='\e[0;32m'
  50 + ENDCOLOR='\e[0m'
  51 + echo -e "[ ${GREEN}DONE${ENDCOLOR} ]"
  52 +}
  53 +
  54 +print_error() {
  55 + RED='\e[0;31m'
  56 + ENDCOLOR='\e[0m'
  57 + echo -e "[ ${RED}ERROR${ENDCOLOR} ] $1"
46 58 }
47 59
48 60 print_usage() {

0 comments on commit 27e1dd1

Please sign in to comment.
Something went wrong with that request. Please try again.