summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
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