Update Downloader.bash
This commit is contained in:
parent
bd8f355b0c
commit
3256a9efdc
1 changed files with 13 additions and 10 deletions
|
@ -1,7 +1,10 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
scriptVersion="1.0"
|
||||
scriptName="RA-ROM-Downloader"
|
||||
romPath="$romPath/RA_collection"
|
||||
downloadPath="$romPath/RA_collection"
|
||||
|
||||
#### Import Settings
|
||||
source /config/extended.conf
|
||||
|
||||
#### Funcitons
|
||||
logfileSetup () {
|
||||
|
@ -22,13 +25,13 @@ logfileSetup () {
|
|||
DownloadRomCountSummary () {
|
||||
OIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
romCount=$(find "$romPath" -type f -iname "*.zip" | wc -l)
|
||||
platformCount=$(find "/$romPath" -maxdepth 1 -mindepth 1 -type d | wc -l)
|
||||
romCount=$(find "$downloadPath" -type f -iname "*.zip" | wc -l)
|
||||
platformCount=$(find "$downloadPath" -maxdepth 1 -mindepth 1 -type d | wc -l)
|
||||
echo "################## ROM SUMMARY ##################" 2>&1 | tee -a /config/$scriptName.log
|
||||
echo "$romCount ROMS downloaded on $platformCount different platforms!!!" 2>&1 | tee -a /config/$scriptName.log
|
||||
echo "############### DETAILED SUMMARY ################" 2>&1 | tee -a /config/$scriptName.log
|
||||
echo "Platforms ($platformCount):;Total:" > /config/temp
|
||||
for romfolder in $(find "/$romPath" -maxdepth 1 -mindepth 1 -type d); do
|
||||
for romfolder in $(find "$downloadPath" -maxdepth 1 -mindepth 1 -type d); do
|
||||
platform="$(basename "$romfolder")"
|
||||
platformRomCount=$(find "$romfolder" -type f -iname "*.zip" | wc -l)
|
||||
echo "$platform;$platformRomCount" >> /config/temp
|
||||
|
@ -42,12 +45,12 @@ DownloadRomCountSummary () {
|
|||
|
||||
DownloadRoms () {
|
||||
echo "############### UPDATING ROMS #################" 2>&1 | tee -a /config/$scriptName.log
|
||||
rclone sync -P --http-url https://ia902505.us.archive.org ":http:/27/items/retroachievements_collection_v5" "$romPath" --filter="- SNES/**" --filter="- NES/**" --filter="- PlayStation Portable/**" --filter="- PlayStation/**" --filter="- PlayStation 2/**" --filter "- retroachievements_collection*" --filter "- TamperMonkeyRetroachievements*" --filter "- __ia_thumb.jpg" --filter "- rclone.txt" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902701.us.archive.org ":http:/29/items/retroachievements_collection_NES/NES" "$romPath/NES" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia802606.us.archive.org ":http:/25/items/retroachievements_collection_SNES/SNES" "$romPath/SNES" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --filter="- *(MSU)*" --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902607.us.archive.org ":http:/23/items/retroachievements_collection_PlayStation_Portable/PlayStation Portable" "$romPath/PlayStation Portable" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902709.us.archive.org ":http:/31/items/retroachievements_collection_PlayStation/PlayStation" "$romPath/PlayStation" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia904707.us.archive.org ":http:/16/items/retroachievements_collection_PS2/PlayStation 2" "$romPath/PlayStation 2" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902505.us.archive.org ":http:/27/items/retroachievements_collection_v5" "$downloadPath" --filter="- SNES/**" --filter="- NES/**" --filter="- PlayStation Portable/**" --filter="- PlayStation/**" --filter="- PlayStation 2/**" --filter "- retroachievements_collection*" --filter "- TamperMonkeyRetroachievements*" --filter "- __ia_thumb.jpg" --filter "- rclone.txt" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902701.us.archive.org ":http:/29/items/retroachievements_collection_NES/NES" "$downloadPath/NES" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia802606.us.archive.org ":http:/25/items/retroachievements_collection_SNES/SNES" "$downloadPath/SNES" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --filter="- *(MSU)*" --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902607.us.archive.org ":http:/23/items/retroachievements_collection_PlayStation_Portable/PlayStation Portable" "$downloadPath/PlayStation Portable" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia902709.us.archive.org ":http:/31/items/retroachievements_collection_PlayStation/PlayStation" "$downloadPath/PlayStation" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
rclone sync -P --http-url https://ia904707.us.archive.org ":http:/16/items/retroachievements_collection_PS2/PlayStation 2" "$downloadPath/PlayStation 2" --local-case-sensitive --delete-before --transfers $downloadTransfers --checkers $downloadCheckers --tpslimit $downloadTpslimit --log-file="/config/rclong.log"
|
||||
}
|
||||
|
||||
# Loop Script
|
||||
|
|
Loading…
Reference in a new issue