summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb55f77)
raw | patch | inline | side by side (parent: bb55f77)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 2 Aug 2006 20:50:20 +0000 (13:50 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 2 Aug 2006 20:58:04 +0000 (13:58 -0700) |
This makes it easier to run gitweb/gitweb.perl without token substitution.
Using @@ makes Perl emit "unintended interpolation" warnings.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Using @@ makes Perl emit "unintended interpolation" warnings.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
gitweb/gitweb.perl | patch | blob | history |
diff --git a/Makefile b/Makefile
index a2b4acaaaecb223f9e08c0a3446957b89ba28d77..3816ef7971ca6ca891d5b1c90f8d4829df17e191 100644 (file)
--- a/Makefile
+++ b/Makefile
gitweb/gitweb.cgi: gitweb/gitweb.perl
rm -f $@ $@+
sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
- -e 's|@@GIT_VERSION@@|$(GIT_VERSION)|g' \
- -e 's|@@GIT_BINDIR@@|$(bindir)|g' \
- -e 's|@@GITWEB_CONFIG@@|$(GITWEB_CONFIG)|g' \
- -e 's|@@GITWEB_SITENAME@@|$(GITWEB_SITENAME)|g' \
- -e 's|@@GITWEB_PROJECTROOT@@|$(GITWEB_PROJECTROOT)|g' \
- -e 's|@@GITWEB_LIST@@|$(GITWEB_LIST)|g' \
- -e 's|@@GITWEB_HOMETEXT@@|$(GITWEB_HOMETEXT)|g' \
- -e 's|@@GITWEB_CSS@@|$(GITWEB_CSS)|g' \
- -e 's|@@GITWEB_LOGO@@|$(GITWEB_LOGO)|g' \
+ -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
+ -e 's|++GIT_BINDIR++|$(bindir)|g' \
+ -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
+ -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
+ -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
+ -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
+ -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
+ -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
+ -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
$< >$@+
chmod +x $@+
mv $@+ $@
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b5548ec8f1460a251905bfcdd12f7aa9cbf44003..58eb5b190f80179ad0b210b990d8bbcd54d9ec10 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
binmode STDOUT, ':utf8';
our $cgi = new CGI;
-our $version = "@@GIT_VERSION@@";
+our $version = "++GIT_VERSION++";
our $my_url = $cgi->url();
our $my_uri = $cgi->url(-absolute => 1);
our $rss_link = "";
# core git executable to use
# this can just be "git" if your webserver has a sensible PATH
-our $GIT = "@@GIT_BINDIR@@/git";
+our $GIT = "++GIT_BINDIR++/git";
# absolute fs-path which will be prepended to the project path
#our $projectroot = "/pub/scm";
-our $projectroot = "@@GITWEB_PROJECTROOT@@";
+our $projectroot = "++GITWEB_PROJECTROOT++";
# location for temporary files needed for diffs
our $git_temp = "/tmp/gitweb";
# name of your site or organization to appear in page titles
# replace this with something more descriptive for clearer bookmarks
-our $site_name = "@@GITWEB_SITENAME@@" || $ENV{'SERVER_NAME'} || "Untitled";
+our $site_name = "++GITWEB_SITENAME++" || $ENV{'SERVER_NAME'} || "Untitled";
# html text to include at home page
-our $home_text = "@@GITWEB_HOMETEXT@@";
+our $home_text = "++GITWEB_HOMETEXT++";
# URI of default stylesheet
-our $stylesheet = "@@GITWEB_CSS@@";
+our $stylesheet = "++GITWEB_CSS++";
# URI of GIT logo
-our $logo = "@@GITWEB_LOGO@@";
+our $logo = "++GITWEB_LOGO++";
# source of projects list
-our $projects_list = "@@GITWEB_LIST@@";
+our $projects_list = "++GITWEB_LIST++";
# default blob_plain mimetype and default charset for text/plain blob
our $default_blob_plain_mimetype = 'text/plain';
# (relative to the current git repository)
our $mimetypes_file = undef;
-our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "@@GITWEB_CONFIG@@";
+our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
require $GITWEB_CONFIG if -e $GITWEB_CONFIG;
# version of the core git binary