forked from GsDevKit/gsDevKitHome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallPharo
executable file
·57 lines (44 loc) · 1.23 KB
/
installPharo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /bin/bash
#=========================================================================
# Copyright (c) 2014, 2015 GemTalk Systems, LLC <[email protected]>.
#=========================================================================
echo "================="
echo " GsDevKit script: $(basename $0) $*"
echo "================="
usage() {
cat <<HELP
USAGE: $(basename $0) [-h]
Download and install a Linux or Mac or Pharo3.0 VM, image and changes file.
OPTIONS
-h display help
EXAMPLES
$(basename $0) -h
$(basename $0)
HELP
}
set -e # exit on error
if [ "${GS_HOME}x" = "x" ] ; then
echo "the GS_HOME environment variable needs to be defined"; exit 1
fi
source ${GS_HOME}/bin/shFunctions
getOpts_help $@
if [ $# -ne 0 ]; then
usage; exit 1
fi
echo "Installing Pharo"
if [ -e "$GS_HOME/pharo/pharo-vm" ]; then
echo "Pharo already installed. To reinstall delete Pharo directory and try again."
exit 0
fi
# Look for wget to download Pharo
if [ -e "`which wget`" ]; then
cmd="`which wget`"
else
echo "[Error] wget is not available. Install wget and rerun this script."
exit 1
fi
# Download Pharo
cd $GS_HOME/pharo
wget -O- get.pharo.org/vm30 | bash
wget -O- get.pharo.org/30 | bash
echo "...finished $(basename $0)"