From: Chris Hanson Date: Wed, 11 Jan 2017 08:14:34 +0000 (-0800) Subject: Fix code that looks for default STAGE0 to check /usr/local. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~153 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1b85d86fafaaf8ae865e95155e2c4134654b14b4;p=mit-scheme.git Fix code that looks for default STAGE0 to check /usr/local. --- diff --git a/etc/run-three-stages b/etc/run-three-stages index b100324d3..ff7a0274f 100755 --- a/etc/run-three-stages +++ b/etc/run-three-stages @@ -83,7 +83,8 @@ find_stage () { find_build_stage "${1}" && return 0 if [[ ${1} == stage0 ]]; then - find_dist_stage "${1}" && return 0 + find_dist_stage $(pwd)/"${1}" && return 0 + find_dist_stage /usr/local && return 0 find_build_stage "${STAGE0}" && return 0 fi echo "Unable to find ${1} executable" >&2 @@ -104,8 +105,12 @@ find_build_stage () find_dist_stage () { - local STAGE=$(pwd)/${1} - local LIBDIR=${STAGE}/lib/mit-scheme* + local STAGE=${1} + local LIBDIRS=(${STAGE}/lib/mit-scheme*) + if (( ${#LIBDIRS[@]} < 1 )); then + return 1 + fi + local LIBDIR=${LIBDIRS[0]} if [[ -x ${STAGE}/bin/mit-scheme && -f ${LIBDIR}/all.com ]]; then export MIT_SCHEME_EXE=${STAGE}/bin/mit-scheme export MITSCHEME_LIBRARY_PATH=${LIBDIR}