updater.sh: adjust printf_color_newline()

printf_color() functions by assigning the first positional parameter and
shifting it out of the list of parameters. If the interface is misused
and the first positional parameter is also the only parameter, what
would happen? It is probably better to change both to handle that
situation the same way since the code savings is minimal.

While here, add back in a newline that was accidentally nuked in the
first commit.
This commit is contained in:
Ashlen 2023-05-04 17:45:41 -06:00
parent 8b0ee0618e
commit 1a0bbae1ac

View file

@ -57,8 +57,9 @@ printf_color() {
}
printf_color_newline() {
printf_color "$@"
echo
PROVIDED_COLOR="$1"
shift
printf "${PROVIDED_COLOR}%s${NC}\n" "$*"
}
warn() {
@ -81,6 +82,7 @@ else
exit 1
fi
show_banner() {
printf_color_newline "${BBLUE}" '
############################################################################