Diff

Differences From Artifact [0e6a9ba02e]:

To Artifact [9efdfb74a1]:


   193    193   	## Determine if we have a Tclkit to do this work
   194    194   	TCLKIT="${TCLKIT:-tclkit}"
   195    195   	if echo 'exit 0' | "${TCLKIT}" >/dev/null 2>/dev/null; then
   196    196   		## Install using existing Tclkit
   197    197   		### Call installer
   198    198   		echo "Running: \"${TCLKIT}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\""
   199    199   		"${TCLKIT}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
   200         -	elif echo 'exit 0' | ./kit >/dev/null 2>/dev/null; then
   201         -		## Bootstrap (cannot cross-compile)
   202         -		### Call installer
   203         -		cp kit runkit
   204         -		echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl
   205         -		echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
   206         -		echo 'source installvfs.tcl' >> setup.tcl
          200  +	else
          201  +		if [ ! -f ./kit.exe ]; then
          202  +			if echo 'exit 0' | ./kit >/dev/null 2>/dev/null; then
          203  +				## Bootstrap (cannot cross-compile)
          204  +				### Call installer
          205  +				cp kit runkit
          206  +				echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl
          207  +				echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl
          208  +				echo 'source installvfs.tcl' >> setup.tcl
   207    209   
   208         -		echo 'Running: echo | ./runkit setup.tcl'
   209         -		echo | ./runkit setup.tcl || exit 1
   210         -	else
   211         -		## Install using Tclsh, which may work if we're not using Metakit
   212         -		### Call installer
   213         -		echo "Running: \"${TCLSH_NATIVE}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\""
   214         -		"${TCLSH_NATIVE}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
   215         -		
          210  +				echo 'Running: echo | ./runkit setup.tcl'
          211  +				echo | ./runkit setup.tcl || exit 1
          212  +			else
          213  +				## Install using Tclsh, which may work if we're not using Metakit
          214  +				### Call installer
          215  +				echo "Running: \"${TCLSH_NATIVE}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\""
          216  +				"${TCLSH_NATIVE}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
          217  +			fi
          218  +		else
          219  +			## Install using Tclsh, which may work if we're not using Metakit
          220  +			### Call installer
          221  +			echo "Running: \"${TCLSH_NATIVE}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\""
          222  +			"${TCLSH_NATIVE}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1
          223  +		fi
   216    224   	fi
   217    225   
   218    226   	# Cleanup
   219    227   	if [ "${KITTARGET}" = "kitdll" ]; then
   220    228   		## Remove built interpreters if we are building KitDLL --
   221    229   		## they're just tiny stubs anyway
   222    230   		rm -f kit runkit
   223    231   	fi
   224    232   
   225    233   	exit 0
   226    234   ) || exit 1
   227    235   
   228    236   exit 0