Gitweb: use gitweb_config.perl
Junio C Hamano committed
Oct 5, 2006 at 22:00 UTC
ba467e080011108eb6813eb3b79380cc66565802
2 files changed
+22
-12
Gitweb
+5
-12
@@ -1,23 +1,16 @@
1
#!/bin/sh
2
3
+G=/opt/packrat/playpen/public/in-place/git
4
+Meta/Make GITWEB_CONFIG=$G/index/gitweb_config.perl gitweb/gitweb.cgi
5
+
6
cd gitweb &&
7
DEST=`cd ../../index && /bin/pwd` || exit
8
6
-sed -e '
7
-/^our .gitbin = /s|"/usr/bin"|"/home/junio/bin/Linux"|
8
-/^our .GIT = /s|"/usr/bin/|"/home/junio/bin/Linux/|
9
-/^our .projectroot = /s|".*"|"/opt/packrat/playpen/public/in-place/git"|
10
-/^our .stylesheet = /s|".*"|"/gitweb.css"|
11
-/^our .logo = /s|".*"|"/git-logo.png"|
12
-/^our .favicon = /s|".*"|"/git-favicon.png"|
13
-/^our .projects_list = /s|".*"|"/opt/packrat/playpen/public/in-place/git/index/index.aux"|
14
-' gitweb.cgi >gitweb.cgi++
15
-
9
differs=
10
11
if test -f "$DEST/gitweb.cgi"
12
then
20
- diff -u "$DEST/gitweb.cgi" gitweb.cgi++ || differs="g$differs"
13
+ diff -u "$DEST/gitweb.cgi" gitweb.cgi || differs="g$differs"
14
else
15
differs="g$differs"
16
fi
@@ -62,7 +55,7 @@ esac
55
case "$differs" in
56
*g*)
57
rm -f "$DEST/gitweb.cgi"
65
- cp gitweb.cgi++ "$DEST/gitweb.cgi"
58
+ cp gitweb.cgi "$DEST/gitweb.cgi"
59
chmod +x "$DEST/gitweb.cgi"
60
;;
61
esac
gitweb_config.perl
new
+17
@@ -0,0 +1,17 @@
1
+#
2
+
3
+our $G = '/opt/packrat/playpen/public/in-place/git';
4
+$GIT = '/home/junio/bin/Linux/git';
5
+$projectroot = $G;
6
+$site_name = 'Gitster Local';
7
+$stylesheet = '/gitweb.css';
8
+$logo = '/git-logo.png';
9
+$favicon = '/git-favicon.png';
10
+$projects_list = "$G/index/index.aux";
11
+
12
+while (my ($k, $v) = each %feature) {
13
+ $feature{$k}{'override'} = 1;
14
+}
15
+$feature{'pathinfo'}{'override'} = 0;
16
+$feature{'pathinfo'}{'default'} = [1];
17
+1;