Index: dbus/build.sh ================================================================== --- dbus/build.sh +++ dbus/build.sh @@ -35,13 +35,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: itcl/build.sh ================================================================== --- itcl/build.sh +++ itcl/build.sh @@ -57,13 +57,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: kitcreator ================================================================== --- kitcreator +++ kitcreator @@ -18,10 +18,14 @@ TCLVERS="$1" shift fi export TCLVERS + +# Add the helpers directory to the path +PATH="$(dirname "$(which "$0")")"/common/helpers:"${PATH}" +export PATH # Verify that "pre.sh" has been run if this is a development snapshot of # KitCreator if [ -f 'build/pre.sh' ]; then if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then Index: mk4tcl/build.sh ================================================================== --- mk4tcl/build.sh +++ mk4tcl/build.sh @@ -40,13 +40,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: nsf/build.sh ================================================================== --- nsf/build.sh +++ nsf/build.sh @@ -32,13 +32,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: tcc4tcl/build.sh ================================================================== --- tcc4tcl/build.sh +++ tcc4tcl/build.sh @@ -38,13 +38,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}.tmp" - || exit 1 fi fi ( cd 'build' || exit 1 Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -63,11 +63,11 @@ mkdir "${workdir}" || exit 1 cd "${workdir}" || exit 1 # Handle Tcl first, since it will be used to base other packages on - wget -O "tmp-tcl.tar.gz" "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tcl.tar.gz' + download "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tcl.tar.gz" - || rm -f 'tmp-tcl.tar.gz' gzip -dc 'tmp-tcl.tar.gz' | tar -xf - mv "tcl-fossil" "tcl${TCLVERS}" # Determine date of this Tcl release and use that date for all other dependent packages ## Unless the release we are talking about is "trunk", in which case we use that everywhere @@ -81,25 +81,25 @@ if [ -z "${FOSSILDATE}" ]; then FOSSILDATE="${FOSSILTAG}" fi # Handle other packages - wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-itcl.tar.gz' - wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-thread.tar.gz" - wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tclconfig.tar.gz" + download "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-itcl.tar.gz" - || rm -f 'tmp-itcl.tar.gz' + download "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-thread.tar.gz" - || rm -f "tmp-thread.tar.gz" + download "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tclconfig.tar.gz" - || rm -f "tmp-tclconfig.tar.gz" if [ "${FOSSILDATE}" = "trunk" ] || [ "$(echo "${FOSSILDATE}" | cut -f 1 -d '-')" -ge '2012' ]; then _USE_TDBC='1' _USE_SQLITE='1' SQLITEVERS='3071401' fi if [ "${_USE_TDBC}" = '1' ]; then - wget -O "tmp-tdbc.tar.gz" "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tdbc.tar.gz" + download "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tdbc.tar.gz" - || rm -f "tmp-tdbc.tar.gz" fi if [ "${_USE_SQLITE}" = '1' ]; then - wget -O "tmp-sqlite3.tar.gz" "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" || rm -f "tmp-sqlite3.tar.gz" + download "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" "tmp-sqlite3.tar.gz" - || rm -f "tmp-sqlite3.tar.gz" fi gzip -dc "tmp-itcl.tar.gz" | tar -xf - gzip -dc "tmp-thread.tar.gz" | tar -xf - gzip -dc "tmp-tclconfig.tar.gz" | tar -xf - @@ -149,22 +149,16 @@ rm -rf "${workdir}" ) || exit 1 else if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || ( + download "${SRCURL}" "${SRC}" - || ( echo ' Unable to download source code for Tcl.' >&4 - echo " Attempted to run: wget -O \"${SRC}.tmp\" \"${SRCURL}\"" >&4 - echo " Got:" - wget -O "${SRC}.tmp" "${SRCURL}" 2>&1 | sed 's@^@ @' >&4 - echo ' Aborting Tcl -- further packages will likely also fail.' >&4 exit 1 ) || exit 1 - mv "${SRC}.tmp" "${SRC}" fi fi fi ( Index: tcllib/build.sh ================================================================== --- tcllib/build.sh +++ tcllib/build.sh @@ -14,13 +14,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: tclvfs/build.sh ================================================================== --- tclvfs/build.sh +++ tclvfs/build.sh @@ -38,13 +38,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: tclx/build.sh ================================================================== --- tclx/build.sh +++ tclx/build.sh @@ -38,13 +38,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: thread/build.sh ================================================================== --- thread/build.sh +++ thread/build.sh @@ -56,13 +56,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: tk/build.sh ================================================================== --- tk/build.sh +++ tk/build.sh @@ -79,15 +79,15 @@ rm -rf "${workdir}" mkdir "${workdir}" || exit 1 cd "${workdir}" || exit 1 - wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tk.tar.gz' + download "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tk.tar.gz" - || rm -f 'tmp-tk.tar.gz' gzip -dc "tmp-tk.tar.gz" | tar -xf - || rm -f 'tmp-tk.tar.gz' if [ ! -s 'tmp-tk.tar.gz' ]; then - wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-tk.tar.gz' + download "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tk.tar.gz" - || rm -f 'tmp-tk.tar.gz' gzip -dc "tmp-tk.tar.gz" | tar -xf - fi mv "tk-fossil" "tk${TCLVERS}" @@ -96,13 +96,11 @@ cd .. rm -rf "${workdir}" ) else if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi fi ( Index: tls/build.sh ================================================================== --- tls/build.sh +++ tls/build.sh @@ -38,13 +38,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: udp/build.sh ================================================================== --- udp/build.sh +++ udp/build.sh @@ -38,13 +38,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: yajltcl/build.sh ================================================================== --- yajltcl/build.sh +++ yajltcl/build.sh @@ -36,19 +36,15 @@ if [ ! -d 'buildsrc' ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -f "${SRC}" ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi if [ ! -f "${YAJLSRC}" ]; then - rm -f "${YAJLSRC}.tmp" - wget -O "${YAJLSRC}.tmp" "${YAJLSRCURL}" || exit 1 - mv "${YAJLSRC}.tmp" "${YAJLSRC}" + download "${YAJLSRCURL}" "${YAJLSRC}" - || exit 1 fi fi ( cd 'build' || exit 1 Index: zlib/build.sh ================================================================== --- zlib/build.sh +++ zlib/build.sh @@ -31,13 +31,11 @@ if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if [ ! -d 'buildsrc' ]; then - rm -f "${SRC}.tmp" - wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 - mv "${SRC}.tmp" "${SRC}" + download "${SRCURL}" "${SRC}" - || exit 1 fi fi ( cd 'build' || exit 1