[OpenWrt-Devel,1/2] scripts/gen_image_generic.sh: replace -o with if/&&
diff mbox series

Message ID 20200106022255.169318-1-rosenp@gmail.com
State New
Headers show
Series
  • [OpenWrt-Devel,1/2] scripts/gen_image_generic.sh: replace -o with if/&&
Related show

Commit Message

Rosen Penev Jan. 6, 2020, 2:22 a.m. UTC
-o is not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 scripts/gen_image_generic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 2c57d56f07..527ca5bacc 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"