Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dziallas <sebastian@when.com>2009-11-21 16:51:17 (GMT)
committer Sebastian Dziallas <sebastian@when.com>2009-11-21 16:51:17 (GMT)
commit46db13dcbbd95e1649010ad3c6cdc611d8114845 (patch)
treec5e73c8e3eff21a9167c7a0670c615475709f53d
parentabf85823361397824c9477c76e99954a4f9da3f2 (diff)
revert last commit wrt downloading ebooks
-rw-r--r--soas-aslo-and-content.ks8
1 files changed, 6 insertions, 2 deletions
diff --git a/soas-aslo-and-content.ks b/soas-aslo-and-content.ks
index 9b3dd6e..a739653 100644
--- a/soas-aslo-and-content.ks
+++ b/soas-aslo-and-content.ks
@@ -105,8 +105,12 @@ EPUB="148/burnett-secret-garden-illustrations" # The Secret Garden
for epub in $EPUB ; do
url=http://www.epubbooks.com/book/$epub.epub
- wget $url -P $CACHE_DIR
- cp -p $CACHE_DIR/*.epub $BUNDLES_DIR
+ remote_file=$(basename $(curl -4 -s -L -w %{url_effective} -I $url | tail -1))
+ bundle=$CACHE_DIR/$remote_file
+ if [ ! -f $bundle ] ; then
+ curl -s -4 -L $url > $bundle
+ fi
+ cp -p $bundle $BUNDLES_DIR
done
# get the script to install the activities