threads / patch / 38748

patchgit-instaweb: use @SHELL_PATH@ instead of /bin/sh

Subject: [PATCH] git-instaweb: use @SHELL_PATH@ instead of /bin/sh

## tl;dr

One message between Mar 8, 2015 and Mar 8, 2015. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Kyle J. McKay· Mar 8, 2015, 05:05 UTC · lore

If the user has configured a value for SHELL_PATH then be sure to use it for any generated scripts instead of hard-coding /bin/sh.

The first line of the script is handled specially, but the embedded #!/bin/sh line in the here document will not be automatically updated unless it uses @SHELL_PATH@.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
 git-instaweb.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to git-instaweb.sh +1 −1
diff --git a/git-instaweb.sh b/git-instaweb.sh
index 513efa66..7b6ba2bc 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -204,7 +204,7 @@ webrick_conf () {
 	# actual gitweb.cgi using a shell script to force it
   wrapper="$fqgitdir/gitweb/$httpd/wrapper.sh"
 	cat > "$wrapper" <<EOF
-#!/bin/sh
+#!@SHELL_PATH@
 # we use this shell script wrapper around the real gitweb.cgi since
 # there appears to be no other way to pass arbitrary environment variables
 # into the CGI process
---

← back to recent threads