Created
September 8, 2013 18:51
-
-
Save bodiam/6487401 to your computer and use it in GitHub Desktop.
This script mirrors the gutenberg cache of generated file formats.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script mirrors the gutenberg cache | |
# of generated file formats | |
# By Braddock Gaskill 2013 | |
DIR=/knowledge/data/gutenberg/cache/generated | |
mkdir -p "${DIR}" | |
cd "${DIR}" | |
pwd | |
while (true); do | |
echo -n 'RSYNC START ' | |
date | |
rsync --progress -avHSz --delete --delete-after \ | |
--exclude='*.zip' \ | |
--exclude='*.mp3' \ | |
--exclude='*.ogg' \ | |
--exclude='*.iso' \ | |
--exclude='*.ISO' \ | |
--exclude='*pgdvd*' \ | |
--exclude='*.rar' \ | |
--exclude='*.mpeg' \ | |
--exclude='*.m4b' \ | |
--exclude='*.wav' \ | |
--exclude='*.log' \ | |
--exclude='*.mobi' \ | |
--exclude='*.pdb' \ | |
--exclude='*.rdf' \ | |
--exclude='*.qioo.jar' \ | |
ftp@ftp.ibiblio.org::gutenberg-epub . | |
echo -n 'SLEEPING 30 MINUTES: RSYNC ENDED ' | |
date | |
sleep 1800 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment