Subject: [alpine-devel] [PATCH] mkinitfs.in: Fix typo leading to "sh: missing ]" error.

From: Przemyslaw Pawelczyk <[email-masked]>
Date: Mon, 20 Nov 2017 14:09:34 +0100

Reported-by: Duncan on #alpine-linux

Also negate test result instead of negating expression within test.
It's better to minimize test "extra" features usage.

XSI extensions specifying the -a and -o binary primaries and the '(' and
')' operators have been marked obsolescent as there are clearer shell
equivalents. Negation (!) is not marked obsolescent (at least yet),
but shell usage is preferred.
---

I think it should be applied in aports too, stable included.

 mkinitfs.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkinitfs.in b/mkinitfs.in
index 0cd5d30b274c..596ae7b753e4 100755
--- a/mkinitfs.in
+++ b/mkinitfs.in
@@ -233,7 +233,7 @@ if [ -z "$outfile" ]; then
 	outfile="${basedir}boot/initramfs-${kflavor}"
 fi
 
-if [ -z "$nokernel"] && [ ! -d "$kerneldir" ]; then
+if [ -z "$nokernel" ] && ! [ -d "$kerneldir" ]; then
 	echo "$kerneldir does not exist or is not a directory"
 	exit 1
 fi
-- 
2.13.5

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---