forked from XDATA-Year-3/EntityAlignLarge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ea
executable file
·41 lines (35 loc) · 1.21 KB
/
ea
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
#!/bin/sh
# Launches qcr application on the supplied hostname and port.
#
# Omitting the hostname defaults it to "localhost", while omitting both defaults
# to "localhost:8000".
#
# Set the TANGELO environment variable to use a different Tangelo executable
# than the one on the path.
# Set TANGELO environment variable if unset.
if [ -z "${TANGELO}" ]; then
TANGELO=`command -v tangelo`
if [ -z "${TANGELO}" ]; then
echo "error: tangelo not found on path (set TANGELO, or add tangelo to path)" >/dev/stderr
exit 1
fi
fi
# Parse command line arguments.
hostname=$1
port=$2
if [ -z "${hostname}" ]; then
# If both are missing, they both receive the default values.
port=8080
hostname=localhost
elif [ -z "${port}" ]; then
# If the "port" argument is missing, then assume the "hostname" argument is
# actually the port.
port=${hostname}
hostname=localhost
fi
# Find the absolute path to this script.
# used to be readlink here, but macos XCODE 6.2 changed so readlink didn't work, changed to stat
here=`readlink -f $0`
here=`dirname "${here}"`
# Launch the application
"${TANGELO}" --root "${here}/built" --host ${hostname} --port ${port} --config "${here}/tangelo-config.yaml"