aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-01-05 18:22:54 -0800
committerPetr Štetiar <ynezz@true.cz>2020-07-11 13:33:28 +0200
commit3819337cdf8c0c8f0807c000b01ac0c2f13c02c7 (patch)
treed407701d15c165fd3942c599d8c3dadb22cf016b /scripts
parent227e47b3ca964939f41c3564dd7da72d60044d00 (diff)
downloadupstream-3819337cdf8c0c8f0807c000b01ac0c2f13c02c7.tar.gz
upstream-3819337cdf8c0c8f0807c000b01ac0c2f13c02c7.tar.bz2
upstream-3819337cdf8c0c8f0807c000b01ac0c2f13c02c7.zip
scripts/gen_image_generic.sh: replace -o with if/&&
-o is not well defined. Found with shellcheck. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_image_generic.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 53f73dc6e1..8091d95575 100755
--- 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"