summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-07-02 16:01:24 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-07-02 16:02:50 +0200
commit09175591851b67beb6714346d6ab4f4d9f9429fc (patch)
treefbc496502966a0dd0e95dcded680a7fa4e85faa9
parentcd689b768f86707354645a65bc920eb87659fb6d (diff)
downloadbible-fetch-09175591851b67beb6714346d6ab4f4d9f9429fc.tar.gz
bible-fetch-09175591851b67beb6714346d6ab4f4d9f9429fc.tar.bz2
bible-fetch-09175591851b67beb6714346d6ab4f4d9f9429fc.zip
Replace gen-bible.sh by a Makefile
That is more flexible, since it allows easy invokation of recreation of a single chapter. And its twice as fast as gen-bible.sh when using parallel build. :)
-rw-r--r--Makefile17
-rwxr-xr-xgen-bible.sh11
2 files changed, 17 insertions, 11 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fcdfe3f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+CHAPTERS=$(shell ./list-chapters.sh)
+CHAPTERS_XML=$(CHAPTERS:=.xml)
+
+all: book-list elberfelder2006.zip
+
+chapters/%.xml: chapters/% convert.sed convert.xsl
+ ./convert.sed $< | xsltproc --encoding utf-8 --html convert.xsl - > $@
+
+elberfelder2006.xml: $(CHAPTERS_XML)
+ ./concat.sh > $@
+
+%.zip: %.xml
+ zip $@ $<
+
+clean:
+ rm -f $(CHAPTERS_XML)
+ rm -f elberfelder2006.{xml,zip}
diff --git a/gen-bible.sh b/gen-bible.sh
deleted file mode 100755
index c4eb50e..0000000
--- a/gen-bible.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-./list-chapters.sh | while read file
-do
- echo "$file"
- ./convert.sed "$file" | \
- xsltproc --encoding utf-8 --html convert.xsl - > "${file}.xml"
-done
-./concat.sh > elberfelder2006.xml
-
-zip elberfelder2006.zip elberfelder2006.xml