summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2020-08-03 15:13:55 +0000
committertnn <tnn@pkgsrc.org>2020-08-03 15:13:55 +0000
commit8f2784eff5325bcab988130c9e97a5b5afad756f (patch)
treeda37b6e6b33407530b994f7bfa08cfa58e506cdb /shells
parent7313855769e6c76337b67b5ccd468b4fabd03f99 (diff)
downloadpkgsrc-8f2784eff5325bcab988130c9e97a5b5afad756f.tar.gz
mksh: remove double brackets
Diffstat (limited to 'shells')
-rw-r--r--shells/mksh/patches/patch-Build.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/shells/mksh/patches/patch-Build.sh b/shells/mksh/patches/patch-Build.sh
new file mode 100644
index 00000000000..b8962870d91
--- /dev/null
+++ b/shells/mksh/patches/patch-Build.sh
@@ -0,0 +1,42 @@
+$NetBSD: patch-Build.sh,v 1.1 2020/08/03 15:13:55 tnn Exp $
+
+remove double brackets
+
+--- Build.sh.orig 2020-08-03 15:12:31.960450602 +0000
++++ Build.sh
+@@ -2520,7 +2520,7 @@ cat >test.sh <<-EOF
+ for y in "\${check_categories[@]}"; do
+ x=\$x,\$y
+ done
+- if [[ -n \$x ]]; then
++ if [ -n \$x ]; then
+ args[\${#args[*]}]=-C
+ args[\${#args[*]}]=\${x#,}
+ fi
+@@ -2539,7 +2539,7 @@ cat >test.sh <<-EOF
+ fi
+ (( vflag )) && args[\${#args[*]}]=-v
+ (( xflag )) && args[\${#args[*]}]=-x # force usage by synerr
+- if [[ -n \$TMPDIR && -d \$TMPDIR/. ]]; then
++ if [ -n \$TMPDIR && -d \$TMPDIR/. ]; then
+ args[\${#args[*]}]=-T
+ args[\${#args[*]}]=\$TMPDIR
+ fi
+@@ -2550,7 +2550,7 @@ cat >test.sh <<-EOF
+ cstr='\$os = defined \$^O ? \$^O : "unknown";'
+ cstr="\$cstr"'print \$os . ", Perl version " . \$];'
+ for perli in \$PERL perl5 perl no; do
+- if [[ \$perli = no ]]; then
++ if [ \$perli = no ]; then
+ print Cannot find a working Perl interpreter, aborting.
+ exit 1
+ fi
+@@ -2562,7 +2562,7 @@ cat >test.sh <<-EOF
+ print "=> not using"
+ continue
+ fi
+- if [[ -n \$perlos ]]; then
++ if [ -n \$perlos ]; then
+ print "=> using it"
+ break
+ fi