{"thread":{"id":"7256","subject":"[PATCH] cogito: Escape $* in cg admin-setuprepro to fix problems with older bash versions","startedAt":"2007-03-15T13:53:35Z","lastAt":"2007-03-15T13:53:35Z","messageCount":1,"participants":["mcdmx"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37160","messageId":"etbj4u$sh6$1@sea.gmane.org","threadId":"7256","inReplyTo":null,"subject":"[PATCH] cogito: Escape $* in cg admin-setuprepro to fix problems with older bash versions","fromName":"mcdmx","fromEmail":"mcdmx@users.sf.net","sentAt":"2007-03-15T13:53:35Z","receivedAt":"2007-03-15T13:53:35Z","isPatch":true,"sender":{"key":"mcdmx@users.sf.net","avatar":null},"body":"Using $* in the _Here_ document at the end of cg-admin-setuprepro seriously confuses Bash\nv2.0.5b and causes lines produced by the _Here_ document to look something like\n\n##  EEnnaabbllee ggiitt--uuppddaattee--sseerrvveerr--iinnffoo\n\nThe problem does not occur with Bash 3.1.x. The patch below fixes this by escaping the\ndollar in \"$*\".\n\ndiff --git a/cg-admin-setuprepo b/cg-admin-setuprepo\nindex d407798..a37b6ae 100755\n--- a/cg-admin-setuprepo\n+++ b/cg-admin-setuprepo\n@@ -91,7 +91,7 @@ fi\n _git=\"$uri\"\n cat <<_SCRIPT_EOF_ | $shell $shellarg\n\n-die() { echo \"$*\" >&2; exit 1; }\n+die() { echo \"\\$*\" >&2; exit 1; }\n\n export GIT_DIR=\"$uri\"\n"}]}