@@ -42,10 +42,16 @@ if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then use_fossil='1' elif echo "${TCLVERS}" | grep '^fossil_' >/dev/null; then use_fossil='1' fi + + if [ -d 'buildsrc' ]; then + # Override here to avoid downloading tarball from Fossil if we + # have a particular tree already available. + use_fossil='0' + fi if [ "${use_fossil}" = "1" ]; then ( FOSSILDATE="$(cat "${TCLFOSSILDATE}" 2>/dev/null)" @@ -66,13 +72,15 @@ cd .. rm -rf "${workdir}" ) else - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + if [ ! -d 'buildsrc' ]; then + rm -f "${SRC}.tmp" + wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 + mv "${SRC}.tmp" "${SRC}" + fi fi fi ( cd 'build' || exit 1