forked from GsDevKit/gsDevKitHome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallGci
executable file
·64 lines (52 loc) · 1.52 KB
/
installGci
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
58
59
60
61
62
63
64
#! /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] <gemstone-version>
Copy the gci libraries for the given GemStone version to the
$GS_HOME/pharo directory.
OPTIONS
-h display help
EXAMPLES
$(basename $0) -h
$(basename $0) 3.2.1
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 1 ]; then
usage; exit 1
fi
vers="$1"
echo "Copying gci files to pharo"
pharo_vm=$GS_HOME/pharo/pharo-vm
if [ ! -e "$pharo_vm" ]; then
echo "Install Pharo"
$GS_HOME/bin/installPharo
fi
# Detect operating system
PLATFORM="`uname -sm | tr ' ' '-'`"
# Macs with Core i7 use the same software as older Macs
[ $PLATFORM = "Darwin-x86_64" ] && PLATFORM="Darwin-i386"
case "$PLATFORM" in
Linux-x86_64)
gsvers="GemStone64Bit${vers}-x86_64.Linux"
gs_product=$GS_HOME/gemstone/products/$gsvers
cp $gs_product/lib32/lib* $pharo_vm
;;
Darwin-i386)
gsvers="GemStone64Bit${vers}-i386.Darwin"
gs_product=$GS_HOME/gemstone/products/$gsvers
cp $gs_product/lib32/lib* $pharo_vm/Pharo.app/Contents/MacOS/Plugins
;;
esac
echo "...finished $(basename $0)"