Skip to content

Commit ba467e0

Browse files
author
Junio C Hamano
committed
Gitweb: use gitweb_config.perl
1 parent 03adf42 commit ba467e0

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

Gitweb

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
#!/bin/sh
22

3+
G=/opt/packrat/playpen/public/in-place/git
4+
Meta/Make GITWEB_CONFIG=$G/index/gitweb_config.perl gitweb/gitweb.cgi
5+
36
cd gitweb &&
47
DEST=`cd ../../index && /bin/pwd` || exit
58

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-
169
differs=
1710

1811
if test -f "$DEST/gitweb.cgi"
1912
then
20-
diff -u "$DEST/gitweb.cgi" gitweb.cgi++ || differs="g$differs"
13+
diff -u "$DEST/gitweb.cgi" gitweb.cgi || differs="g$differs"
2114
else
2215
differs="g$differs"
2316
fi
@@ -62,7 +55,7 @@ esac
6255
case "$differs" in
6356
*g*)
6457
rm -f "$DEST/gitweb.cgi"
65-
cp gitweb.cgi++ "$DEST/gitweb.cgi"
58+
cp gitweb.cgi "$DEST/gitweb.cgi"
6659
chmod +x "$DEST/gitweb.cgi"
6760
;;
6861
esac

gitweb_config.perl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

0 commit comments

Comments
 (0)