gitweb: do not use @@FOO@@ for replaced tokens
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>
Junio C Hamano committed
Aug 2, 2006 at 13:50 UTC
06c084d28b150ac1e2ed0c6f3ce7db6ca42dfc67
2 files changed
+18
-18
Makefile
+9
-9
@@ -584,15 +584,15 @@ git-status: git-commit
584
gitweb/gitweb.cgi: gitweb/gitweb.perl
585
rm -f $@ $@+
586
sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
587
- -e 's|@@GIT_VERSION@@|$(GIT_VERSION)|g' \
588
- -e 's|@@GIT_BINDIR@@|$(bindir)|g' \
589
- -e 's|@@GITWEB_CONFIG@@|$(GITWEB_CONFIG)|g' \
590
- -e 's|@@GITWEB_SITENAME@@|$(GITWEB_SITENAME)|g' \
591
- -e 's|@@GITWEB_PROJECTROOT@@|$(GITWEB_PROJECTROOT)|g' \
592
- -e 's|@@GITWEB_LIST@@|$(GITWEB_LIST)|g' \
593
- -e 's|@@GITWEB_HOMETEXT@@|$(GITWEB_HOMETEXT)|g' \
594
- -e 's|@@GITWEB_CSS@@|$(GITWEB_CSS)|g' \
595
- -e 's|@@GITWEB_LOGO@@|$(GITWEB_LOGO)|g' \
587
+ -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
588
+ -e 's|++GIT_BINDIR++|$(bindir)|g' \
589
+ -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
590
+ -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
591
+ -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
592
+ -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
593
+ -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
594
+ -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
595
+ -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
596
$< >$@+
597
chmod +x $@+
598
mv $@+ $@
gitweb/gitweb.perl
+9
-9
@@ -18,18 +18,18 @@ use File::Find qw();
18
binmode STDOUT, ':utf8';
19
20
our $cgi = new CGI;
21
-our $version = "@@GIT_VERSION@@";
21
+our $version = "++GIT_VERSION++";
22
our $my_url = $cgi->url();
23
our $my_uri = $cgi->url(-absolute => 1);
24
our $rss_link = "";
25
26
# core git executable to use
27
# this can just be "git" if your webserver has a sensible PATH
28
-our $GIT = "@@GIT_BINDIR@@/git";
28
+our $GIT = "++GIT_BINDIR++/git";
29
30
# absolute fs-path which will be prepended to the project path
31
#our $projectroot = "/pub/scm";
32
-our $projectroot = "@@GITWEB_PROJECTROOT@@";
32
+our $projectroot = "++GITWEB_PROJECTROOT++";
33
34
# location for temporary files needed for diffs
35
our $git_temp = "/tmp/gitweb";
@@ -39,18 +39,18 @@ our $home_link = $my_uri;
39
40
# name of your site or organization to appear in page titles
41
# replace this with something more descriptive for clearer bookmarks
42
-our $site_name = "@@GITWEB_SITENAME@@" || $ENV{'SERVER_NAME'} || "Untitled";
42
+our $site_name = "++GITWEB_SITENAME++" || $ENV{'SERVER_NAME'} || "Untitled";
43
44
# html text to include at home page
45
-our $home_text = "@@GITWEB_HOMETEXT@@";
45
+our $home_text = "++GITWEB_HOMETEXT++";
46
47
# URI of default stylesheet
48
-our $stylesheet = "@@GITWEB_CSS@@";
48
+our $stylesheet = "++GITWEB_CSS++";
49
# URI of GIT logo
50
-our $logo = "@@GITWEB_LOGO@@";
50
+our $logo = "++GITWEB_LOGO++";
51
52
# source of projects list
53
-our $projects_list = "@@GITWEB_LIST@@";
53
+our $projects_list = "++GITWEB_LIST++";
54
55
# default blob_plain mimetype and default charset for text/plain blob
56
our $default_blob_plain_mimetype = 'text/plain';
@@ -60,7 +60,7 @@ our $default_text_plain_charset = undef;
60
# (relative to the current git repository)
61
our $mimetypes_file = undef;
62
63
-our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "@@GITWEB_CONFIG@@";
63
+our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
64
require $GITWEB_CONFIG if -e $GITWEB_CONFIG;
65
66
# version of the core git binary