From a4de1eb7869caba6d9020e3f9cc7a817dfc74241 Mon Sep 17 00:00:00 2001 From: p4bl0 Date: Sun, 25 Jul 2010 00:57:27 +0200 Subject: using new include feature in default templates. Reorganised files accordingly --- build.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'build.sh') 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 -- cgit v1.2.3