Index: kitsh/build.sh ================================================================== --- kitsh/build.sh +++ kitsh/build.sh @@ -170,11 +170,11 @@ if echo "${chkkittarget}" | egrep '\.(lib|def|a)$'; then continue fi - KITTARGET_NAME="${chkkittarget}" + KITTARGET_NAME="./${chkkittarget}" break done ## Also create an executable named "kit" so that we can run it later @@ -185,13 +185,13 @@ mv tclsh kit fi else ## The executable is always named "kit" if [ -f 'kit.exe' -a ! -f 'kit' ]; then - KITTARGET_NAME='kit.exe' + KITTARGET_NAME='./kit.exe' else - KITTARGET_NAME='kit' + KITTARGET_NAME='./kit' fi fi export KITTARGET_NAME if [ "${KITTARGET_NAME}" = '__error__' ]; then @@ -207,19 +207,19 @@ ## Install using existing Tclkit ### Call installer echo "Running: \"${TCLKIT}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\" \"${KITTARGET_NAME}.new\"" "${TCLKIT}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" "${KITTARGET_NAME}.new" || exit 1 else - if echo 'exit 0' | ./kit >/dev/null 2>/dev/null; then + if echo 'exit 0' | "${KITTARGET_NAME}" >/dev/null 2>/dev/null; then ## Bootstrap (cannot cross-compile) ### Call installer echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}} {${KITTARGET_NAME}.new}]" > setup.tcl echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl echo 'source installvfs.tcl' >> setup.tcl - echo 'Running: echo | ./kit setup.tcl' - echo | ./kit setup.tcl || exit 1 + echo 'Running: echo | \"${KITTARGET_NAME}\" setup.tcl' + echo | "${KITTARGET_NAME}" setup.tcl || exit 1 else ## Install using Tclsh, which may work if we're not using Metakit ### Call installer echo "Running: \"${TCLSH_NATIVE}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\" \"${KITTARGET_NAME}.new\"" "${TCLSH_NATIVE}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" "${KITTARGET_NAME}.new" || exit 1 @@ -231,12 +231,12 @@ # Cleanup if [ "${KITTARGET}" = "kitdll" ]; then ## Remove built interpreters if we are building KitDLL -- ## they're just tiny stubs anyway - rm -f kit + rm -f "${KITTARGET_NAME}" fi exit 0 ) || exit 1 exit 0