On Tuesday 14 February 2006 20:13, Jean Delvare wrote:
> Hi all,
>
> patch-wrapper uses the =~ test construct, which my bash 2.05b doesn't
> seem to know about. This makes the test suite fail on one of my four
> test systems.

> Proposed patch, comments anyone?

Yes, why not use case instead? How about the attached patch?

Thanks,
Andreas
Index: bin/patch-wrapper.in
===================================================================
RCS file: /sources/quilt/quilt/bin/patch-wrapper.in,v
retrieving revision 1.6
diff -u -r1.6 patch-wrapper.in
--- bin/patch-wrapper.in	11 Feb 2006 14:37:16 -0000	1.6
+++ bin/patch-wrapper.in	14 Feb 2006 21:59:28 -0000
@@ -83,10 +83,15 @@
 if [ $? -ne 0 ]
 then
     cannot_handle=1
-elif [[ ! ${LC_ALL:-${LC_MESSAGES:-${LANG}}} =~ "^$|^C$|^POSIX$|^en" ]]
-then
-    cannot_handle=1
 else
+	case "${LC_ALL:-${LC_MESSAGES:-${LANG}}}" in
+	''|C|POSIX|en*)
+		;;
+	*)	cannot_handle=1
+		;;
+	esac
+fi
+if [ -z "$cannot_handle" ]; then
     eval set -- "$options"
 
     backup_mode=--backup-if-mismatch
@@ -169,10 +174,11 @@
     elif [ -e /proc/self/fd/0 ]
     then
 	patch=$(readlink /proc/self/fd/0)
-	if [[ "$patch" =~ "^pipe:" ]]
-	then
-	    patch=$(find_pipe_patch "$patch")
-	fi
+	case "$patch" in
+	pipe:*)
+		patch=$(find_pipe_patch "$patch")
+		;;
+	esac
     fi
     patch=${patch#$PWD/}
 
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to