projects
/
openwrt
/
staging
/
jow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
227e47b
)
scripts/gen_image_generic.sh: replace -o with if/&&
author
Rosen Penev
<rosenp@gmail.com>
Mon, 6 Jan 2020 02:22:54 +0000
(18:22 -0800)
committer
Petr Štetiar
<ynezz@true.cz>
Sat, 11 Jul 2020 11:33:28 +0000
(13:33 +0200)
-o is not well defined.
Found with shellcheck.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
scripts/gen_image_generic.sh
patch
|
blob
|
history
diff --git
a/scripts/gen_image_generic.sh
b/scripts/gen_image_generic.sh
index 53f73dc6e142e58b0426c97dfaf357bc1b80747f..8091d9557519ddc9a29a8a30f8ab211c1a7a82ab 100755
(executable)
--- a/
scripts/gen_image_generic.sh
+++ b/
scripts/gen_image_generic.sh
@@
-1,10
+1,10
@@
#!/usr/bin/env bash
# Copyright (C) 2006-2012 OpenWrt.org
set -e -x
-[ $# == 5 -o $# == 6 ] || {
+if [ $# -ne 5 ] && [ $# -ne 6 ]; then
echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
exit 1
-}
+fi
OUTPUT="$1"
KERNELSIZE="$2"