quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] =~ construct doesn't work with bash 2.x


From: Jean Delvare
Subject: [Quilt-dev] =~ construct doesn't work with bash 2.x
Date: Tue, 14 Feb 2006 20:13:18 +0100

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?

Index: bin/patch-wrapper.in
===================================================================
RCS file: /cvsroot/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 19:11:07 -0000
@@ -83,7 +83,7 @@
 if [ $? -ne 0 ]
 then
     cannot_handle=1
-elif [[ ! ${LC_ALL:-${LC_MESSAGES:-${LANG}}} =~ "^$|^C$|^POSIX$|^en" ]]
+elif ! echo "${LC_ALL:-${LC_MESSAGES:-${LANG}}}" | grep -q 
'\(^$\|^C$\|^POSIX$\|^en\)'
 then
     cannot_handle=1
 else
@@ -169,7 +169,7 @@
     elif [ -e /proc/self/fd/0 ]
     then
        patch=$(readlink /proc/self/fd/0)
-       if [[ "$patch" =~ "^pipe:" ]]
+       if echo "$patch" | grep -q '^pipe:'
        then
            patch=$(find_pipe_patch "$patch")
        fi

If it looks OK I'll commit this then we can release 0.44.

Thanks,
-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]