usb-boot: Check number of arguments before eating them

This commit is contained in:
Henrik Nordstrom 2013-07-27 22:02:26 +02:00
parent e5736fd09a
commit b398456630

View File

@ -14,9 +14,15 @@ case "$1" in
*.scr) bootscr="$1"; shift
;;
esac
kernel=$1; shift || true
scriptbin=$1; shift || true
initramfs=$1; shift || true
if [ $# -ge 1 ]; then
kernel=$1; shift || true
fi
if [ $# -ge 1 ]; then
scriptbin=$1; shift || true
fi
if [ $# -ge 1 ]; then
initramfs=$1; shift || true
fi
fel() {
echo fel "$@"
$top/fel $@