summaryrefslogtreecommitdiff
path: root/download-books.sh
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-10-23 11:34:16 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-10-23 11:37:07 +0200
commit3748f43f26c6ed4979f0ca4d0a50d0354dc10bb6 (patch)
tree0cf47f9100d0fbdd36d00d1ffacbc952bdc5c441 /download-books.sh
parent2f116f283f4a75e52007ab66ef419dbf6ba9bf8c (diff)
downloadbible-fetch-3748f43f26c6ed4979f0ca4d0a50d0354dc10bb6.tar.gz
bible-fetch-3748f43f26c6ed4979f0ca4d0a50d0354dc10bb6.tar.bz2
bible-fetch-3748f43f26c6ed4979f0ca4d0a50d0354dc10bb6.zip
Make scripts translation independent
Add menge download.
Diffstat (limited to 'download-books.sh')
-rwxr-xr-xdownload-books.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/download-books.sh b/download-books.sh
index 125c29c..f2bca06 100755
--- a/download-books.sh
+++ b/download-books.sh
@@ -1,17 +1,20 @@
#!/bin/sh
-rm -rf books/
-mkdir books
-echo -n > book-list
+translation=$1
-curl -s http://www.die-bibel.de/online-bibeln/elberfelder-bibel/bibeltext/ | \
+mkdir -p ${translation}/
+rm -rf ${translation}/books/
+mkdir ${translation}/books
+echo -n > ${translation}/book-list
+
+curl -s http://www.die-bibel.de/online-bibeln/${translation}-bibel/bibel/bibeltext/ | \
./parse-book.sed | \
while read url
do
read book
book=$(echo $book | sed s:/.*$:: )
echo $book
- echo $book >> book-list
- curl $url > "books/$book"
+ echo $book >> ${translation}/book-list
+ curl $url > "${translation}/books/$book"
done