Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh requires Bash? 2002 revisited



2018-01-06 22:21:36 +0100, Martijn Dekker:
[...]
> However, posh is non-compliant, bug-ridden, unmaintained, generally
> broken, and should not be used. Your problem would be solved by deleting
> posh and using dash for /bin/sh instead.
[...]

One of those bugs at least causes the wrong options for yodl to
be used and "-s" (strip) to be used.

$ posh -c 'case abc in *"b"*) echo yes; esac'
$ posh -c 'case abc in *b*) echo yes; esac'
yes

The patch below works around those, but it still doesn't build
with posh. I'd tend to agree it's probably not worth the effort
working around those if posh is no longer maintained.

diff --git a/configure.ac b/configure.ac
index 1a498f8..e73c4d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,21 +515,21 @@ sed=':1
      s/ *$//'
 
 case " $LDFLAGS " in
-  *" -s "*) strip_exeldflags=true strip_libldflags=true
+  *\ -s\ *) strip_exeldflags=true strip_libldflags=true
     LDFLAGS=`echo " $LDFLAGS " | sed "$sed"` ;;
   *) strip_exeldflags=false strip_libldflags=false ;;
 esac
 
 case " ${EXELDFLAGS+$EXELDFLAGS }" in
   " ") ;;
-  *" -s "*) strip_exeldflags=true
+  *\ -s\ *) strip_exeldflags=true
     EXELDFLAGS=`echo " $EXELDFLAGS " | sed "$sed"` ;;
   *) strip_exeldflags=false ;;
 esac
 
 case " ${LIBLDFLAGS+$LIBLDFLAGS }" in
   " ") ;;
-  *" -s "*) strip_libldflags=true
+  *\ -s\ *) strip_libldflags=true
     LIBLDFLAGS=`echo " $LIBLDFLAGS " | sed "$sed"` ;;
   *) strip_libldflags=false ;;
 esac
@@ -626,9 +626,9 @@ AC_CHECK_PROGS([YODL], [yodl], [: yodl])
 YODL_OPTIONS=''
 if test "x$ac_cv_prog_YODL" = xyodl; then
     case `yodl --version` in
-      *"version 2."*) YODL_OPTIONS='-k' ;;
-      *"version 3."*) YODL_OPTIONS='-k -L' ;;
-      *"version 4."*) YODL_OPTIONS='-k -L' ;;
+      *version\ 2.*) YODL_OPTIONS='-k' ;;
+      *version\ 3.*) YODL_OPTIONS='-k -L' ;;
+      *version\ 4.*) YODL_OPTIONS='-k -L' ;;
     esac
 fi
 AC_SUBST(YODL_OPTIONS)
@@ -3223,7 +3223,7 @@ dnl $result is the default output for config.modules.  We generate
 dnl code to check if we should use this.
 cat <<EOM >> ${CONFIG_MODULES}.sh
 case "\$userlist" in
-  *" $name "*) grep "^name=$name " \${CONFIG_MODULES}.old;;
+  *\ $name\ *) grep "^name=$name " \${CONFIG_MODULES}.old;;
   *) echo "$result";;
 esac
 EOM



Messages sorted by: Reverse Date, Date, Thread, Author