scripts/ubinize-image.sh: fix parameter handling
ubinize-image.sh previously used ${var:offset:length} substitutions which are not valid in standard shell. Replace the existing parameter matching by a case ... esac expression. Signed-off-by: Daniel Golle <daniel@makrotopia.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41347 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
3bd932f5d3
commit
b200c07469
1 changed files with 27 additions and 24 deletions
|
@ -57,36 +57,39 @@ ubilayout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
while [ "$1" ]; do
|
while [ "$1" ]; do
|
||||||
if [ "$1" = "--uboot-env" ]; then
|
case "$1" in
|
||||||
|
"--uboot-env")
|
||||||
ubootenv="ubootenv"
|
ubootenv="ubootenv"
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
fi
|
;;
|
||||||
if [ "$1" = "--no-kernel" ]; then
|
"--no-kernel")
|
||||||
nokernel="nokernel"
|
nokernel="nokernel"
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
fi
|
;;
|
||||||
|
"-"*)
|
||||||
|
ubinize_param="$@"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
if [ ! "$kernel" -a ! "$nokernel" ]; then
|
if [ ! "$kernel" -a ! "$nokernel" ]; then
|
||||||
[ "${1:0:1}" = "-" ] && break
|
|
||||||
kernel=$1
|
kernel=$1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ ! "$rootfs" ]; then
|
if [ ! "$rootfs" ]; then
|
||||||
[ "${1:0:1}" = "-" ] && break
|
|
||||||
rootfs=$1
|
rootfs=$1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ ! "$outfile" ]; then
|
if [ ! "$outfile" ]; then
|
||||||
[ "${1:0:1}" = "-" ] && break
|
|
||||||
outfile=$1
|
outfile=$1
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
ubinize_param="$@"
|
;;
|
||||||
break
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -r "$rootfs" -o ! -r "$kernel" -a ! "$nokernel" -o ! "$outfile" ]; then
|
if [ ! -r "$rootfs" -o ! -r "$kernel" -a ! "$nokernel" -o ! "$outfile" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue