Skip to content

Instantly share code, notes, and snippets.

@Reizinixc
Last active November 13, 2019 08:31
Show Gist options
  • Save Reizinixc/a424b8b7e8523d6dc5b66926c540288c to your computer and use it in GitHub Desktop.
Save Reizinixc/a424b8b7e8523d6dc5b66926c540288c to your computer and use it in GitHub Desktop.
A script to help mirroring ECO patch server (usage: patch-server-mirrorer.bash «startPullingVersion»)
#!/bin/bash
server=patch.gungho.jp
baseUrl="http://${server}/eco"
curl "${baseUrl}/econew.ver" -o "econew.ver"
latestVersion=`cat econew.ver`
for version in `seq $1 $latestVersion`; do
destDirectoryName=`printf "D%08d" $version`
versionUrl="${baseUrl}/${destDirectoryName}"
for fileName in `curl ${versionUrl}/dl_list.txt | cut -f1 -d','`; do
curl "${versionUrl}/${fileName}" --create-dirs -o "${destDirectoryName}/${fileName}"
done
done
exit
@handiwijoyo
Copy link

Hi.. did you managed to backup the patch files?

@Reizinixc
Copy link
Author

Hello @handiwijoyo and sorry for the delay response.

Unfortunately, I couldn't make it since it ate up a lot of space (more than 15 GB if my memory serves me correctly), so I had to remove them all in that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment