diff --git a/roles/common/files/pip_check_requirements_upgrades.sh b/roles/common/files/pip_check_requirements_upgrades.sh index 0ed3d5030ce8e4fb97a0e6d8d1b692c16e3f8cce..9b10d6943148db27c93fef7ef80d9338af619227 100755 --- a/roles/common/files/pip_check_requirements_upgrades.sh +++ b/roles/common/files/pip_check_requirements_upgrades.sh @@ -104,7 +104,7 @@ EOF # Set-up colours for message printing if we're not piping and terminal is # capable of outputting the colors. _color_terminal=$(tput colors 2>&1) -if [[ -t 1 ]] && (( ${_color_terminal} > 0 )); then +if [[ -t 1 ]] && (( _color_terminal > 0 )); then _text_bold=$(tput bold) _text_white=$(tput setaf 7) _text_blue=$(tput setaf 6) @@ -179,7 +179,7 @@ while getopts "V:qdvh" opt; do esac done i=$OPTIND -shift $(($i-1)) +shift $(( i-1 )) if [[ ${#@} == 0 ]]; then @@ -202,6 +202,7 @@ if [[ -n $virtualenv && ! -f $virtualenv/bin/activate ]]; then fi # Activate the virtual environment if it was specified. +# shellcheck disable=SC1090 # no point in validating external script [[ -n $virtualenv ]] && source "$virtualenv/bin/activate" # Verify pip-compile is available. @@ -271,8 +272,8 @@ for environment in "$config_dir"/*; do # versioning information. new=$(echo "$new" | sed -e 's/[[:blank:]]*#.*//' | grep -v "^$" | sort -u) - debug "Current requirements:\n$(echo "$current")" - debug "New requirements:\n$(echo "$new")" + debug "Current requirements:\n$current\n" + debug "New requirements:\n$new\n" # Run diff, storing the output and result. # This is using Bash process substitution, which helps avoid