help-gnats
[Top][All Lists]
Advanced

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

PATCH: Errors from tr when invoking send-pr v4 on Solaris


From: Yngve Svendsen
Subject: PATCH: Errors from tr when invoking send-pr v4 on Solaris
Date: Sat, 12 May 2001 14:30:41 +0200

In the current version 4 CVS, send-pr contains 'tr' expressions that need to be quoted in order to work on Solaris. The patch below replaces ][ with \]\[ in these expressions. This should have no adverse effects in OSes that don't need this quoting in their tr, such as Linux (I have tested this on a Linux box).

Yngve Svendsen


Patch against current version 4 CVS:

Index: send-pr.sh
===================================================================
RCS file: /cvs/gnats/gnats/send-pr/send-pr.sh,v
retrieving revision 1.16
diff -u -p -r1.16 send-pr.sh
--- send-pr.sh  2001/04/08 18:28:25     1.16
+++ send-pr.sh  2001/05/12 12:22:26
@@ -371,7 +371,7 @@ __EOF__
                        else
                                desc="<${values} (one line)>";
                        fi
-                       dpat=`echo "$desc" | tr '][*+^$|\()&/' '............'`
+ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
                        echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
                    fi
                    echo "${fmtname}${desc}" >> $file
@@ -382,7 +382,7 @@ __EOF__
                        desc="  $default_val";
                    else
desc=" <`${BINDIR}/query-pr --field-description $fieldname` (multiple lines)>";
-                       dpat=`echo "$desc" | tr '][*+^$|\()&/' '............'`
+ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
                        echo "s/^${dpat}//" >> $FIXFIL
                    fi
                    echo "${fmtname}" >> $file;
@@ -394,7 +394,7 @@ __EOF__
                        desc="${default_val}"
                    else
desc="<`${BINDIR}/query-pr --field-description $fieldname` (one line)>"
-                       dpat=`echo "$desc" | tr '][*+^$|\()&/' '............'`
+ dpat=`echo "$desc" | tr '\]\[*+^$|\()&/' '............'`
                        echo "/^>${fieldname}:/ s/${dpat}//" >> $FIXFIL
                    fi
                    echo "${fmtname}${desc}" >> $file


reply via email to

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