From 75f0ec107c2d28b034957b998568aa82b4a2e0c0 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 14 Dec 2009 19:17:37 +0100 Subject: 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" for pointing out the issue: http://sourceware.org/ml/crossgcc/2009-12/msg00011.html diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index f1e38fc..d4e15fe 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -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 -- cgit v0.10.2-6-g49f6