1.1 --- a/scripts/functions Sat Aug 09 17:46:56 2008 +0000
1.2 +++ b/scripts/functions Sat Aug 09 17:48:13 2008 +0000
1.3 @@ -491,11 +491,10 @@
1.4 CT_DoGetFile "${url}/${file}${ext}"
1.5 if [ -f "${file}${ext}" ]; then
1.6 if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
1.7 - # No need to test if the file already exists because
1.8 - # it does NOT. If it did exist, we'd have been stopped
1.9 - # above, when looking for local copies.
1.10 + # The file may already exist if downloads are forced: remove it first
1.11 CT_DoLog EXTRA "Saving '${file}' to local storage"
1.12 - CT_DoExecLog ALL mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
1.13 + CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
1.14 + CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
1.15 CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
1.16 fi
1.17 CT_DoLog EXTRA "Got '${file}' from the LAN mirror"
1.18 @@ -514,11 +513,10 @@
1.19 CT_DoGetFile "${url}/${file}${ext}"
1.20 if [ -f "${file}${ext}" ]; then
1.21 if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
1.22 - # No need to test if the file already exists because
1.23 - # it does NOT. If it did exist, we'd have been stopped
1.24 - # above, when looking for local copies.
1.25 + # The file may already exist if downloads are forced: remove it first
1.26 CT_DoLog EXTRA "Saving '${file}' to local storage"
1.27 - CT_DoExecLog ALL mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
1.28 + CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
1.29 + CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
1.30 CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
1.31 fi
1.32 CT_DoLog EXTRA "Got '${file}' from the Internet"