Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -38,10 +38,16 @@ use_fossil='1' FOSSILTAG=$(echo "${TCLVERS}" | sed 's/^fossil_//g') fi export FOSSILTAG + + 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 ( cd src || exit 1 @@ -91,13 +97,15 @@ cd .. rm -rf "${workdir}" ) || exit 1 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 Index: tk/build.sh ================================================================== --- tk/build.sh +++ tk/build.sh @@ -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