aboutsummaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-08 19:00:45 +0000
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-08 19:00:45 +0000
commit07549c00fbe4169247a82821e8642c30ce6bc89f (patch)
tree0fdd6e48e122adc253698189b44337c8b6d0a391 /scripts/functions
parenta1d03e8c790552715ee0d590907f84406b9ae1f5 (diff)
downloadcrosstool-ng-07549c00fbe4169247a82821e8642c30ce6bc89f.tar.gz
crosstool-ng-07549c00fbe4169247a82821e8642c30ce6bc89f.tar.bz2
crosstool-ng-07549c00fbe4169247a82821e8642c30ce6bc89f.zip
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.
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions
index eebe8864..14224c18 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -337,8 +337,8 @@ CT_GetFile() {
CT_DoLog DEBUG "Trying \"${CT_LOCAL_TARBALLS_DIR}/${file}${ext}\""
if [ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" -a \
"${CT_FORCE_DOWNLOAD}" != "y" ]; then
- CT_DoLog EXTRA "Retrieving \"${file}\" from local storage"
- cp -v "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
+ CT_DoLog EXTRA "Using \"${file}\" from local storage"
+ ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
return 0
fi
done
@@ -355,7 +355,8 @@ CT_GetFile() {
# above, when looking for local copies.
if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
CT_DoLog EXTRA "Saving \"${file}\" to local storage"
- cp -v "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
+ mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
+ ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
fi
return 0
fi