]> granicus.if.org Git - python/commitdiff
l2hoption: Do the "right thing" to quote the right-hand-side of Perl
authorFred Drake <fdrake@acm.org>
Mon, 30 Nov 1998 20:30:26 +0000 (20:30 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 30 Nov 1998 20:30:26 +0000 (20:30 +0000)
assignments.  This allows '"', '$', and '@' to be included in
the values passed to parameters like --address.

Doc/tools/mkhowto.sh

index cd85ef078c263d19f54df36fd5c75f5042329aa3..88050d58fdc1b76bb7c077c76f40ed12ab7ba988 100755 (executable)
@@ -157,7 +157,8 @@ build_text() {
 
 l2hoption() {
     if [ "$2" ] ; then
-       echo "\$$1 = \"$2\";" >>$L2H_AUX_INIT_FILE
+       VALUE=`echo "$2" | sed 's/[$"@]/\\\\&/g'`
+       echo "\$$1 = \"$VALUE\";" >>$L2H_AUX_INIT_FILE
     fi
 }