diff options
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |