summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorp4bl0 <pablo@rauzy.name>2010-07-23 11:48:56 +0200
committerp4bl0 <pablo@rauzy.name>2010-07-23 11:48:56 +0200
commit566138139dbb4b9826917226f2c83caeb4f20232 (patch)
treea44489024025f278daa840945b068817c7f604a6 /build.sh
parent627ac7472ad54b1240774dc9085ab005fbabc943 (diff)
wrote build script + fixed bugs installation bugs
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..50d45ee
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+include_file() {
+ tmp=`tempfile -p "figitive"`
+ cat "$2" | gzip | base64 > "$tmp"
+ cat "$1" | sed "/#INCLUDE:$2#/ {
+ r $tmp
+ d }"
+ rm "$tmp"
+}
+
+cp install.sh tmp1
+i=1
+for f in archives.html article.html fugitive.css post-commit.sh post-receive.sh; do
+ j=$((1 - i))
+ include_file tmp$i $f > tmp$j
+ i=$j
+done
+cp tmp$j fugitive
+chmod +x fugitive
+rm tmp0 tmp1