mirror of
https://github.com/arkenfox/user.js.git
synced 2025-04-29 21:43:36 +02:00
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:
parent
8b0ee0618e
commit
1a0bbae1ac
1 changed files with 4 additions and 2 deletions
|
@ -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}" '
|
||||
############################################################################
|
||||
|
|
Loading…
Add table
Reference in a new issue