forked from EverestAPI/Olympus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
olympus.sh
executable file
·41 lines (34 loc) · 1.11 KB
/
olympus.sh
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
#!/bin/sh
# Olympus launch script bundled with Linux and macOS builds.
# macOS doesn't have readlink -f and Linux can symlink this launch script.
realpath() {
[ "." = "${1}" ] && n=${PWD} || n=${1}; while nn=$( readlink -n "$n" ); do n=$nn; done; echo "$n"
}
cd "$(dirname "$(realpath "$0")")" || exit 1
if [ -f "olympus.new.love" ]; then
if [ -n "${OLYMPUS_RESTARTER_PID+x}" ]; then
attempt=0
while [ "$attempt" -lt 30 ] && kill -0 "$OLYMPUS_RESTARTER_PID"; do
attempt=$((attempt + 1))
sleep 0.1
done
fi
mv "olympus.love" "olympus.old.love"
mv "olympus.new.love" "olympus.love"
fi
if [ "$(uname)" = "Darwin" ]; then
DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:$(pwd)"
export DYLD_LIBRARY_PATH
else
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(pwd)"
export LD_LIBRARY_PATH
fi
# On Linux/osx we use the wrapper script, the .sh version is here for debugging purposes
if [ -f "find-love.sh" ]; then
./find-love.sh olympus.love $@
elif [ -f "find-love" ]; then
./find-love olympus.love $@
else
echo "find-love script not found, can't proceed!"
exit 1
fi