From 4b122e8989e137bcc0202bbc11a6096ea12bd192 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Tue, 7 Nov 2023 20:03:17 +0100 Subject: [PATCH] website-build: build.sh: fix missing double quote in $i comparison. Without that fix, using shellcheck on this file results in several warning like this one: In website-build/build.sh line 101: if [ $i -ge $# ] ; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- website-build/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website-build/build.sh b/website-build/build.sh index bef76d2..2f4c372 100755 --- a/website-build/build.sh +++ b/website-build/build.sh @@ -81,7 +81,7 @@ help_missing_arg() } i=1 -while [ $i -le $# ] ; do +while [ "$i" -le $# ] ; do opt="$(eval echo \$$i)" case "${opt}" in @@ -90,7 +90,7 @@ while [ $i -le $# ] ; do exit 0 ;; --with-lbwww-path) - if [ $i -ge $# ] ; then + if [ "$i" -ge $# ] ; then help_missing_arg "--with-lbwww-path" exit ${EX_USAGE} fi @@ -98,7 +98,7 @@ while [ $i -le $# ] ; do i="$(expr $i + 1)" ;; --with-untitled-path) - if [ $i -ge $# ] ; then + if [ "$i" -ge $# ] ; then help_missing_arg "--with-untitled-path" exit ${EX_USAGE} fi