Gitweb: use gitweb_config.perl

This commit is contained in:
Junio C Hamano 2006-10-05 22:00:50 -07:00
parent 03adf42c98
commit ba467e0800
2 changed files with 22 additions and 12 deletions

17
Gitweb
View file

@ -1,23 +1,16 @@
#!/bin/sh
G=/opt/packrat/playpen/public/in-place/git
Meta/Make GITWEB_CONFIG=$G/index/gitweb_config.perl gitweb/gitweb.cgi
cd gitweb &&
DEST=`cd ../../index && /bin/pwd` || exit
sed -e '
/^our .gitbin = /s|"/usr/bin"|"/home/junio/bin/Linux"|
/^our .GIT = /s|"/usr/bin/|"/home/junio/bin/Linux/|
/^our .projectroot = /s|".*"|"/opt/packrat/playpen/public/in-place/git"|
/^our .stylesheet = /s|".*"|"/gitweb.css"|
/^our .logo = /s|".*"|"/git-logo.png"|
/^our .favicon = /s|".*"|"/git-favicon.png"|
/^our .projects_list = /s|".*"|"/opt/packrat/playpen/public/in-place/git/index/index.aux"|
' gitweb.cgi >gitweb.cgi++
differs=
if test -f "$DEST/gitweb.cgi"
then
diff -u "$DEST/gitweb.cgi" gitweb.cgi++ || differs="g$differs"
diff -u "$DEST/gitweb.cgi" gitweb.cgi || differs="g$differs"
else
differs="g$differs"
fi
@ -62,7 +55,7 @@ esac
case "$differs" in
*g*)
rm -f "$DEST/gitweb.cgi"
cp gitweb.cgi++ "$DEST/gitweb.cgi"
cp gitweb.cgi "$DEST/gitweb.cgi"
chmod +x "$DEST/gitweb.cgi"
;;
esac

17
gitweb_config.perl Normal file
View file

@ -0,0 +1,17 @@
#
our $G = '/opt/packrat/playpen/public/in-place/git';
$GIT = '/home/junio/bin/Linux/git';
$projectroot = $G;
$site_name = 'Gitster Local';
$stylesheet = '/gitweb.css';
$logo = '/git-logo.png';
$favicon = '/git-favicon.png';
$projects_list = "$G/index/index.aux";
while (my ($k, $v) = each %feature) {
$feature{$k}{'override'} = 1;
}
$feature{'pathinfo'}{'override'} = 0;
$feature{'pathinfo'}{'default'} = [1];
1;