summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-07-01 22:14:14 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-02 01:29:26 (GMT)
commita51d37c1df66386a4d9b7559d64a39241d4e47da (patch)
tree42dfb62f0c583b0c02e6605c7ae8466488041d6e /Makefile
parentdc6d9b4999bfdf6bcabf8803f9fa886eb9eaba28 (diff)
downloadgit-a51d37c1df66386a4d9b7559d64a39241d4e47da.zip
git-a51d37c1df66386a4d9b7559d64a39241d4e47da.tar.gz
git-a51d37c1df66386a4d9b7559d64a39241d4e47da.tar.bz2
Add git-instaweb, instantly browse the working repo with gitweb
I got tired of having to configure gitweb for every repository I work on. I sometimes prefer gitweb to standard GUIs like gitk or gitview; so this lets me automatically configure gitweb to browse my working repository and also opens my browser to it. Updates from the original patch: Added Apache/mod_perl2 compatibility if Dennis Stosberg's gitweb has been applied, too: <20060621130708.Gcbc6e5c@leonov.stosberg.net> General cleanups in shell code usage. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cde619c..83d8922 100644
--- a/Makefile
+++ b/Makefile
@@ -142,7 +142,7 @@ SCRIPT_PYTHON = \
SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
$(patsubst %.py,%,$(SCRIPT_PYTHON)) \
- git-cherry-pick git-status
+ git-cherry-pick git-status git-instaweb
# The ones that do not have to link with lcrypto, lz nor xdiff.
SIMPLE_PROGRAMS = \
@@ -545,6 +545,20 @@ git-status: git-commit
cp $< $@+
mv $@+ $@
+git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css
+ rm -f $@ $@+
+ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
+ -e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
+ $@.sh | sed \
+ -e 's|@@GITWEB_CGI@@|#!$(PERL_PATH_SQ)|; T; r gitweb/gitweb.cgi' \
+ | sed \
+ -e 's|@@GITWEB_CSS@@||; T; r gitweb/gitweb.css' \
+ > $@+
+ chmod +x $@+
+ mv $@+ $@
+
# These can record GIT_VERSION
git$X git.spec \
$(patsubst %.sh,%,$(SCRIPT_SH)) \