Use symlinks to the localy stored tarballs rather than copying them.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Sep 08 19:00:45 2007 +0000 (2007-09-08)
changeset 37129c6c5e10cea
parent 370 26fe0433ce29
child 372 f635b165bf18
Use symlinks to the localy stored tarballs rather than copying them.
If saving tarballs to local storage is selected, move newly downloaded tarballs there and symlink.
scripts/functions
     1.1 --- a/scripts/functions	Sat Sep 08 10:32:53 2007 +0000
     1.2 +++ b/scripts/functions	Sat Sep 08 19:00:45 2007 +0000
     1.3 @@ -337,8 +337,8 @@
     1.4          CT_DoLog DEBUG "Trying \"${CT_LOCAL_TARBALLS_DIR}/${file}${ext}\""
     1.5          if [ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" -a \
     1.6               "${CT_FORCE_DOWNLOAD}" != "y" ]; then
     1.7 -            CT_DoLog EXTRA "Retrieving \"${file}\" from local storage"
     1.8 -            cp -v "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
     1.9 +            CT_DoLog EXTRA "Using \"${file}\" from local storage"
    1.10 +            ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
    1.11              return 0
    1.12          fi
    1.13      done
    1.14 @@ -355,7 +355,8 @@
    1.15                  # above, when looking for local copies.
    1.16                  if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
    1.17                      CT_DoLog EXTRA "Saving \"${file}\" to local storage"
    1.18 -                    cp -v "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
    1.19 +                    mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
    1.20 +                    ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
    1.21                  fi
    1.22                  return 0
    1.23              fi