summaryrefslogtreecommitdiff
path: root/build.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 /build.sh
parentd7a6747d12a570c6408e1d2f7685508f98a4cfa5 (diff)
using new include feature in default templates. Reorganised files accordingly
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index 1f3e40d..4bbd162 100755
--- a/build.sh
+++ b/build.sh
@@ -1,9 +1,10 @@
#!/bin/bash
include_file() {
+ f=`echo -n $2 | sed 's/\//\\\\\//g'`
tmp=`tempfile -p "figitive"`
cat "$2" | gzip | base64 > "$tmp"
- cat "$1" | sed "/#INCLUDE:$2#/ {
+ cat "$1" | sed "/#INCLUDE:$f#/ {
r $tmp
d }"
rm "$tmp"
@@ -11,11 +12,9 @@ include_file() {
cp install.sh tmp1
i=1
-for f in archives.html article.html \
- fugitive.css print.css README \
- post-commit.sh post-receive.sh; do
+for f in README post-commit.sh post-receive.sh default-files/*; do
j=$((1 - i))
- include_file tmp$i $f > tmp$j
+ include_file tmp$i "$f" > tmp$j
i=$j
done
cp tmp$j fugitive