summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorp4bl0 <pablo@rauzy.name>2010-07-25 00:57:27 +0200
committerp4bl0 <pablo@rauzy.name>2010-07-25 00:57:27 +0200
commita4de1eb7869caba6d9020e3f9cc7a817dfc74241 (patch)
treeaadba16beb24e963ee9c0e01df3550ec67daad1b /install.sh
parentd7a6747d12a570c6408e1d2f7685508f98a4cfa5 (diff)
using new include feature in default templates. Reorganised files accordingly
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/install.sh b/install.sh
index 7cd45a2..640a4d8 100644
--- a/install.sh
+++ b/install.sh
@@ -1,13 +1,13 @@
#!/bin/sh
-replace_var_by_string() {
+replace_string() {
sed "s/<?fugitive-install\s\+$1\s*?>/$2/"
}
fugitive_write_template() {
name=`git config --get user.name`
- base64 -d | gunzip | replace_var_by_string name "$name" | \
- replace_var_by_string year "`date +%Y`"
+ base64 -d | gunzip | replace_string "name" "$name" | \
+ replace_string "year" "`date +%Y`"
}
fugitive_install_hooks() {
@@ -46,10 +46,16 @@ fugitive_install() {
echo "done."
echo -n "Writing default template files... "
fugitive_write_template > _templates/article.html <<EOF
-#INCLUDE:article.html#
+#INCLUDE:default-files/article.html#
EOF
fugitive_write_template > _templates/archives.html <<EOF
-#INCLUDE:archives.html#
+#INCLUDE:default-files/archives.html#
+EOF
+ fugitive_write_template > _templates/nav-header.html <<EOF
+#INCLUDE:default-files/nav-header.html#
+EOF
+ fugitive_write_template > _templates/footer.html <<EOF
+#INCLUDE:default-files/footer.html#
EOF
echo "done."
echo -n "Writing dummy article (README)... "
@@ -59,10 +65,10 @@ EOF
echo "done."
echo -n "Writing default css files... "
(base64 -d | gunzip) > fugitive.css <<EOF
-#INCLUDE:fugitive.css#
+#INCLUDE:default-files/fugitive.css#
EOF
(base64 -d | gunzip) > print.css <<EOF
-#INCLUDE:print.css#
+#INCLUDE:default-files/print.css#
EOF
echo "done."
fugitive_install_hooks