| 1 | diff --git git-instaweb.sh.orig git-instaweb.sh |
| 2 | index b79c6b6..9e9253a 100755 |
| 3 | --- git-instaweb.sh.orig |
| 4 | +++ git-instaweb.sh |
| 5 | @@ -30,8 +30,7 @@ test -z "$port" && port=1234 |
| 6 | |
| 7 | start_httpd () { |
| 8 | httpd_only="`echo $httpd | cut -f1 -d' '`" |
| 9 | - if test "`expr index $httpd_only /`" -eq '1' || \ |
| 10 | - which $httpd_only >/dev/null |
| 11 | + if test echo $http_only | grep ^/ || which $httpd_only >/dev/null |
| 12 | then |
| 13 | $httpd $fqgitdir/gitweb/httpd.conf |
| 14 | else |
| 15 | @@ -207,10 +206,14 @@ EOF |
| 16 | } |
| 17 | |
| 18 | script=' |
| 19 | -s#^\(my\|our\) $projectroot =.*#\1 $projectroot = "'`dirname $fqgitdir`'";# |
| 20 | -s#\(my\|our\) $gitbin =.*#\1 $gitbin = "'$GIT_EXEC_PATH'";# |
| 21 | -s#\(my\|our\) $projects_list =.*#\1 $projects_list = $projectroot;# |
| 22 | -s#\(my\|our\) $git_temp =.*#\1 $git_temp = "'$fqgitdir/gitweb/tmp'";#' |
| 23 | +s#^my $projectroot =.*#my $projectroot = "'`dirname $fqgitdir`'";# |
| 24 | +s#^our $projectroot =.*#our $projectroot = "'`dirname $fqgitdir`'";# |
| 25 | +s#my $gitbin =.*#my $gitbin = "'$GIT_EXEC_PATH'";# |
| 26 | +s#our $gitbin =.*#our $gitbin = "'$GIT_EXEC_PATH'";# |
| 27 | +s#my $projects_list =.*#my $projects_list = $projectroot;# |
| 28 | +s#our $projects_list =.*#our $projects_list = $projectroot;# |
| 29 | +s#my $git_temp =.*#my $git_temp = "'$fqgitdir/gitweb/tmp'";# |
| 30 | +s#our $git_temp =.*#our $git_temp = "'$fqgitdir/gitweb/tmp'";#' |
| 31 | |
| 32 | gitweb_cgi () { |
| 33 | cat > "$1.tmp" <<\EOFGITWEB |