DownloadNewData.command script just deletes HarvestMap*.lua files on any curl command errors.
I suggest this change to correct this script.
Now curl command would create ${addondir}/Modules/HarvestMap${zone}/${fn}.new file,
if checks that ${addondir}/Modules/HarvestMap${zone}/${fn}.new file exists and bugger than 100k and if ok renames file to ${addondir}/Modules/HarvestMap${zone}/${fn}
- curl -# -d @"${svfn2}" -o "${addondir}/Modules/HarvestMap${zone}/${fn}" "http://harvestmap.binaryvector.net:8081"
-
+ curl -# -d @"${svfn2}" -o "${addondir}/Modules/HarvestMap${zone}/${fn}.new" "http://harvestmap.binaryvector.net:8081"
+ if [[ $(find "${addondir}/Modules/HarvestMap${zone}/${fn}.new" -type f -size +100000c 2>/dev/null) ]]; then
+ echo "Removing old file..."
+ rm -fv "${addondir}/Modules/HarvestMap${zone}/${fn}"
+ mv -f "${addondir}/Modules/HarvestMap${zone}/${fn}.new" "${addondir}/Modules/HarvestMap${zone}/${fn}"
+ fi
|
Thank you. |