scripts/functions
branch1.2
changeset 781 33c13a486d89
parent 780 da5cd379de06
child 971 80c1478b1297
     1.1 --- a/scripts/functions	Sat Aug 09 18:06:43 2008 +0000
     1.2 +++ b/scripts/functions	Sat Aug 09 18:10:29 2008 +0000
     1.3 @@ -385,12 +385,11 @@
     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 -                        mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
    1.13 -                        ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
    1.14 +                        CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
    1.15 +                        CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
    1.16 +                        CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
    1.17                      fi
    1.18                      return 0
    1.19                  fi
    1.20 @@ -406,12 +405,11 @@
    1.21              CT_DoGetFile "${url}/${file}${ext}"
    1.22              if [ -f "${file}${ext}" ]; then
    1.23                  if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
    1.24 -                    # No need to test if the file already exists because
    1.25 -                    # it does NOT. If it did exist, we'd have been stopped
    1.26 -                    # above, when looking for local copies.
    1.27 +                    # The file may already exist if downloads are forced: remove it first
    1.28                      CT_DoLog EXTRA "Saving '${file}' to local storage"
    1.29 -                    mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
    1.30 -                    ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
    1.31 +                    CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
    1.32 +                    CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
    1.33 +                    CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
    1.34                  fi
    1.35                  return 0
    1.36              fi