tech-pkg archive

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

Re: Improving 'bmake wrapper' speed



On Fri, 22 Aug 2014, Thomas Klausner wrote:
Looking at the patch, it consists mostly of changes like these:

-              $cat << EOF
-s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g
-s|\([$_sep]\)$1$|\1$2|g
-s|^$1\([$_sep]\)|$2\1|g
-s|^$1$|$2|g
-EOF
+                       echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
+                       echo "s|\([$_sep]\)$1\([$_sep]\)|\1$2\2|g"
+                       echo "s|\([$_sep]\)$1$|\1$2|g"
+                       echo "s|^$1\([$_sep]\)|$2\1|g"
+                       echo "s|^$1$|$2|g"

The only I thing I wonder about this is if there is a quoting
difference between the two versions that might be relevant for pkgsrc,
or not.

I think the quoting is fine.  The here document in cat <<EOF should be
handled by the shell like a double-quoted string, except that quotation
marks are not special inside a here document.



Home | Main Index | Thread Index | Old Index