[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Minor shell script syntax error in notes/svnsync.txt

From: era eriksson <era+gmane_at_iki.fi>
Date: 2007-12-19 10:20:56 CET

I hope I am following the letter and spirit of the bug-reporting instructions
http://subversion.tigris.org/project_issues.html correctly here.

There is a minor quoting issue in the shell script in
http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt which this patch
attempts to fix. Basically, the backslash-escaping of shell variables in a
single-quoted here document is hypercorrect (fancy word for "wrong"). I suspect
the single quotes were added later without adjusting the rest of the script.

Do I still need to report this as a bug once somebody confirms, or is this
sufficient?

[[[
Fix shell script quoting error in svnsync pre-revprop-change example

* notes/svnsync.txt: no escaping of $ in single-quoted here document
]]]

Index: notes/svnsync.txt
===================================================================
--- notes/svnsync.txt (revision 28552)
+++ notes/svnsync.txt (working copy)
@@ -18,9 +18,9 @@
 
 $ cat <<'EOF' > dest/hooks/pre-revprop-change
 #!/bin/sh
-USER="\$3"
+USER="$3"
 
-if [ "\$USER" = "svnsync" ]; then exit 0; fi
+if [ "$USER" = "svnsync" ]; then exit 0; fi
 
 echo "Only the svnsync user can change revprops" >&2
 exit 1

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 19 11:15:21 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.