mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 10:12:04 +02:00
lbmk: Fix regressions
- A spurious semicolon caused the arguments to printf in die() to be
executed instead of printed
- ${@} in die() needs to be in quotes or else printf prints each word on
a separate line
- The number of arguments to main() does not include main itself so it
should be comparing against 1 instead of 2 to determine if enough
arguments were supplied.
This commit is contained in:
@@ -39,7 +39,7 @@ main()
|
|||||||
elif [ "${0##*/}" = "blobutil" ]; then
|
elif [ "${0##*/}" = "blobutil" ]; then
|
||||||
./update blobs $@ || exit 1
|
./update blobs $@ || exit 1
|
||||||
exit 0
|
exit 0
|
||||||
elif [ $# -lt 2 ]; then
|
elif [ $# -lt 1 ]; then
|
||||||
die "Too few arguments. Try: ${0} help"
|
die "Too few arguments. Try: ${0} help"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ listmodes()
|
|||||||
|
|
||||||
die()
|
die()
|
||||||
{
|
{
|
||||||
printf "Error: %s\n"; ${@} 1>&2
|
printf "Error: %s\n" "${@}" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user