scripts: correctly warn when the local tarballs directory does not exist

Warn about a missing local tarball directory, only if it was configured.
Avoid the spurious message:
  Directory '${CT_LOCAL_TARBALLS_DIR}' does not exist.
  Will not save downloaded tarballs to local storage.

Thanks to "Pedro I. Sanchez" <psanchez@colcan.ca> for pointing out the
issue:
  http://sourceware.org/ml/crossgcc/2009-12/msg00011.html
This commit is contained in:
Yann E. MORIN" 2009-12-14 19:17:37 +01:00
parent 6c6415a101
commit 75f0ec107c

View File

@ -168,8 +168,10 @@ if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}" ]; then
fi
# If the local tarball directory does not exist, say so, and don't try to save there!
if [ ! -d "${CT_LOCAL_TARBALLS_DIR}" ]; then
CT_DoLog WARN "Directory '${CT_LOCAL_TARBALLS_DIR}' does not exist. Will not save downloaded tarballs to local storage."
if [ "${CT_SAVE_TARBALLS}" = "y" \
-a ! -d "${CT_LOCAL_TARBALLS_DIR}" ]; then
CT_DoLog WARN "Directory '${CT_LOCAL_TARBALLS_DIR}' does not exist."
CT_DoLog WARN "Will not save downloaded tarballs to local storage."
CT_SAVE_TARBALLS=
fi