download_libgenrs.sh
1 #!/bin/bash 2 3 set -Eeuxo pipefail 4 # https://stackoverflow.com/a/3355423 5 cd "$(dirname "$0")" 6 7 # Run this script by running: docker exec -it aa-data-import--web /scripts/download_libgenrs.sh 8 # Download scripts are idempotent but will RESTART the download from scratch! 9 10 cd /temp-dir 11 12 # Delete everything so far, so we don't confuse old and new downloads. 13 rm -f libgen.rar fiction.rar 14 15 aria2c -c -x4 -s4 -j4 'http://libgen.rs/dbdumps/libgen.rar' 16 aria2c -c -x4 -s4 -j4 'http://libgen.rs/dbdumps/fiction.rar'