From cd689b768f86707354645a65bc920eb87659fb6d Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 2 Jul 2012 15:52:02 +0200 Subject: Dont use spaces for chapters directories Allows us to generate xml with makefiles, which will allow parallel operation. --- concat.sh | 5 +++-- download-chapters.sh | 3 ++- list-chapters.sh | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/concat.sh b/concat.sh index e9b203e..30e4f13 100755 --- a/concat.sh +++ b/concat.sh @@ -11,10 +11,11 @@ cat book-list | while read buch do echo "" + buchdir=$(echo "$buch" | sed "s/ /_/g") i=1 - while [ -e "chapters/$buch/$i" ] + while [ -e "chapters/$buchdir/$i" ] do - cat "chapters/$buch/$i.xml" | sed 1d + cat "chapters/$buchdir/$i.xml" | sed 1d i=$((i+1)) done diff --git a/download-chapters.sh b/download-chapters.sh index ba29d8e..facaeeb 100755 --- a/download-chapters.sh +++ b/download-chapters.sh @@ -12,6 +12,7 @@ do echo $url echo "$buch $number" - curl $url > "chapters/$buch/$number" + buchdir=$(echo "$buch" | sed "s/ /_/g") + curl $url > "chapters/$buchdir/$number" done done diff --git a/list-chapters.sh b/list-chapters.sh index 0964982..df0f241 100755 --- a/list-chapters.sh +++ b/list-chapters.sh @@ -3,9 +3,10 @@ cat book-list | while read buch do i=1 - while [ -e "chapters/$buch/$i" ] + buchdir=$(echo "$buch" | sed "s/ /_/g") + while [ -e "chapters/$buchdir/$i" ] do - echo "chapters/$buch/$i" + echo "chapters/$buchdir/$i" i=$((i+1)) done done -- cgit