mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-23 22:52:23 +00:00
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.
This commit is contained in:
parent
a1d03e8c79
commit
07549c00fb
@ -337,8 +337,8 @@ CT_GetFile() {
|
|||||||
CT_DoLog DEBUG "Trying \"${CT_LOCAL_TARBALLS_DIR}/${file}${ext}\""
|
CT_DoLog DEBUG "Trying \"${CT_LOCAL_TARBALLS_DIR}/${file}${ext}\""
|
||||||
if [ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" -a \
|
if [ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" -a \
|
||||||
"${CT_FORCE_DOWNLOAD}" != "y" ]; then
|
"${CT_FORCE_DOWNLOAD}" != "y" ]; then
|
||||||
CT_DoLog EXTRA "Retrieving \"${file}\" from local storage"
|
CT_DoLog EXTRA "Using \"${file}\" from local storage"
|
||||||
cp -v "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
|
ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -355,7 +355,8 @@ CT_GetFile() {
|
|||||||
# above, when looking for local copies.
|
# above, when looking for local copies.
|
||||||
if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
|
if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
|
||||||
CT_DoLog EXTRA "Saving \"${file}\" to local storage"
|
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
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user