summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorp4bl0 <pablo@rauzy.name>2010-08-10 22:25:11 +0200
committerp4bl0 <pablo@rauzy.name>2010-08-10 22:25:11 +0200
commitf71626c7ecade5cf26baa9cb318cdd1c3d0c84c1 (patch)
treea894c4aebf28fd8577abb647a6bd97d54a62e478 /install.sh
parentd0618efb643f2dbec9b470a129946396315f60d5 (diff)
now preventing commit when zero article (for real ^^) and push when fugitive.blog-url not set
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index 5a2b2d2..2801336 100644
--- a/install.sh
+++ b/install.sh
@@ -12,6 +12,12 @@ fugitive_write_template() {
fugitive_install_hooks() {
echo -n "Installing fugitive hooks scripts... "
+ (base64 -d | gunzip) >> .git/hooks/pre-commit <<EOF
+#INCLUDE:pre-commit.sh#
+EOF
+ (base64 -d | gunzip) >> .git/hooks/pre-receive <<EOF
+#INCLUDE:pre-receive.sh#
+EOF
(base64 -d | gunzip) > .git/hooks/post-commit <<EOF
#INCLUDE:post-commit.sh#
EOF
@@ -22,6 +28,8 @@ EOF
tee -a .git/hooks/post-commit) >> .git/hooks/post-receive <<EOF
#INCLUDE:html-gen.sh#
EOF
+ chmod +x .git/hooks/pre-commit
+ chmod +x .git/hooks/pre-receive
chmod +x .git/hooks/post-commit
chmod +x .git/hooks/post-receive
echo "done."
@@ -89,14 +97,14 @@ EOF
echo "done."
echo -n "Importing files into git repository... "
git add _templates/* _public/*.css >/dev/null
- git commit -m "fugitive inital import" >/dev/null 2>&1
+ git commit --no-verify -m "fugitive inital import" >/dev/null 2>&1
echo "done."
echo "Writing dummy article (README) and adding it to the repos... "
(base64 -d | gunzip) > _articles/README <<EOF
#INCLUDE:README#
EOF
git add _articles/README
- git commit -m "fugitive: README" >/dev/null
+ git commit --no-verify -m "fugitive: README" >/dev/null
echo "done."
fi
echo "Installation complete, please set your blog url using"