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 diff --git a/archives.html b/default-files/archives.html similarity index 74% rename from archives.html rename to default-files/archives.html index 0cef075..5cb8981 100644 --- a/archives.html +++ b/default-files/archives.html @@ -21,16 +21,7 @@
fugitive: a blog engine for hackers.-