summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2010-07-21 17:58:54 -0400
committerGuillaume Seguin <guillaume@segu.in>2010-07-21 17:58:54 -0400
commit13d9dbeeea7088dacce4f8467ff1b9cd91b671d0 (patch)
tree3fca2aa3f779152fb27a83201c037187f9e710a1
parente16add1c60582df51b62ae5c14e7d22ab212e238 (diff)
downloadblogit-13d9dbeeea7088dacce4f8467ff1b9cd91b671d0.tar.gz
blogit-13d9dbeeea7088dacce4f8467ff1b9cd91b671d0.tar.bz2
Handle run from hook
-rw-r--r--raw_produce5
1 files changed, 4 insertions, 1 deletions
diff --git a/raw_produce b/raw_produce
index 498c0e9..a374bb0 100644
--- a/raw_produce
+++ b/raw_produce
@@ -4,7 +4,10 @@ import subprocess
import os
import sys
-repo = os.path.dirname (os.path.abspath (__file__))
+if "GIT_DIR" in os.environ:
+ repo = os.environ["GIT_DIR"]
+else:
+ repo = os.path.dirname (os.path.abspath (__file__))
out_path = os.path.join (repo, "index.html")
description = open (os.path.join (repo, ".git", "description")).read ()