diff -r d8777ccf522a -r 5d174ffe1dc6 scripts/functions --- a/scripts/functions Sat Aug 09 17:46:56 2008 +0000 +++ b/scripts/functions Sat Aug 09 17:48:13 2008 +0000 @@ -491,11 +491,10 @@ CT_DoGetFile "${url}/${file}${ext}" if [ -f "${file}${ext}" ]; then if [ "${CT_SAVE_TARBALLS}" = "y" ]; then - # No need to test if the file already exists because - # it does NOT. If it did exist, we'd have been stopped - # above, when looking for local copies. + # The file may already exist if downloads are forced: remove it first CT_DoLog EXTRA "Saving '${file}' to local storage" - CT_DoExecLog ALL mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" + CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" + CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" fi CT_DoLog EXTRA "Got '${file}' from the LAN mirror" @@ -514,11 +513,10 @@ CT_DoGetFile "${url}/${file}${ext}" if [ -f "${file}${ext}" ]; then if [ "${CT_SAVE_TARBALLS}" = "y" ]; then - # No need to test if the file already exists because - # it does NOT. If it did exist, we'd have been stopped - # above, when looking for local copies. + # The file may already exist if downloads are forced: remove it first CT_DoLog EXTRA "Saving '${file}' to local storage" - CT_DoExecLog ALL mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" + CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" + CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" fi CT_DoLog EXTRA "Got '${file}' from the Internet"