forked from GsDevKit/gsDevKitHome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpharo
executable file
·52 lines (42 loc) · 1.02 KB
/
pharo
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
#! /bin/bash
#=========================================================================
# Copyright (c) 2014, 2015 GemTalk Systems, LLC <dhenrich@gemtalksystems.com>.
#=========================================================================
echo "================="
echo " GsDevKit script: $(basename $0) $*"
echo "================="
usage() {
cat <<HELP
USAGE: $(basename $0) [-h]
Run headless pharo scripts using the Pharo image.
OPTIONS
-h display help
EXAMPLES
$(basename $0) -h
$(basename $0)
HELP
}
case "$1" in
--*) # pass to pharo
;;
-*) # handle single -h options here
while getopts "h" OPT ; do
case "$OPT" in
h) usage; exit 0 ;;
esac
done
usage; exit 1
;;
*) # pass everything else to pharo
;;
esac
set -e # exit on error
if [ "${GS_HOME}x" = "x" ] ; then
echo "the GS_HOME environment variable needs to be defined"
exit 1
fi
if [ ! -e "$GS_HOME/pharo/pharo" ]; then
$GS_HOME/bin/installPharo
fi
pharo=$GS_HOME/pharo
$pharo/pharo $pharo/Pharo.image $*