# do you want pretty and verbose output? # copy the snippet below or relative pathing in shell from your file # ---------SNIPPET------------------- # # Source shell defaults # # $0 is the currently running program (this file) # this_file_directory=$(dirname $0) # EDIT THIS ONE LINE IN YOUR SCRIPT # relative_path=$this_file_directory/../your_path_here # # if a file exists there, source it. otherwise complain # if test -f $relative_path; then # source $relative_path # else # echo -e "\033[31m\nFAILED TO SOURCE TEST RUNNING OPTIONS.\033[39m" # echo -e "\033[31mTried $relative_path\033[39m" # exit 1 # fi # ---------------------------- # Run away from anything even a little scary set -o nounset # -u exit if a variable is not set set -o errexit # -f exit for any command failure # text color escape codes (please note \033 == \e but OSX doesn't respect the \e) blue_text='\033[94m' red_text='\033[31m' default_text='\033[39m' # set -x/xtrace' uses a Sony PS4 for more info PS4="$blue_text"'${BASH_SOURCE}:${LINENO}:'"$default_text " # Last for more pretty output set -o xtrace # -x display every line before exectution; enables PS4