Skip to content

Commit e816597

Browse files
committed
do not download the VM if it is in PATH. Mandatory to use the system-wide VM on some Linux distro instead of the Zeroconf VM
1 parent 9edf474 commit e816597

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/build.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,20 @@ function get_platform_identifier() {
3030
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3131
__builddir="$(pwd)/build"
3232
PHARO_VERSION="${PHARO_VERSION:-130}"
33-
PHARO="./pharo Pharo.image --no-default-preferences"
3433

3534
rm -rf "${__builddir}" && mkdir -p "${__builddir}" && cd "${__builddir}"
36-
wget -O - get.pharo.org/64/${PHARO_VERSION}+vm | bash
35+
36+
if command -v pharo >/dev/null 2>&1; then
37+
echo "pharo is in PATH"
38+
PHARO_VM_BIN="pharo"
39+
wget -O - get.pharo.org/64/${PHARO_VERSION} | bash
40+
else
41+
echo "pharo not found in PATH"
42+
wget -O - get.pharo.org/64/${PHARO_VERSION}+vm | bash
43+
PHARO_VM_BIN="./pharo"
44+
fi
45+
46+
PHARO="$PHARO_VM_BIN Pharo.image --no-default-preferences"
3747

3848
REPOSITORY_PATH=${__dir}/../src
3949
OS=$(get_platform_identifier)

0 commit comments

Comments
 (0)