-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathentrypoint
executable file
·51 lines (44 loc) · 1.59 KB
/
entrypoint
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
#!/bin/bash
## This file starts the Jarvis container
echo " _______ __ _ ____ _____ "
echo "| __ \ \ / //\ | | / __ \ / ____|"
echo "|_| | \ \_/ // \ | | | | | | | "
echo " | |\ // /\ \ | | | | | | | _ "
echo " ____| | | |/ / \ \| |___| |__| | |__| |"
echo "|_____/ |_/_/ \_\______\____/ \_____|"
echo ""
echo "https://www.dyalog.com"
echo ""
export JARVIS=/opt/mdyalog/Jarvis
## Set default threading to "1", which means
## run Jarvis on Thread 1 and dequeue it
export DYALOG_JARVIS_THREAD=${DYALOG_JARVIS_THREAD-1}
export DYALOG_JARVIS_PORT=${DYALOG_JARVIS_PORT-8080}
export MAXWS=${MAXWS-256M}
export DYALOG=/opt/mdyalog/19.0/64/unicode/
export WSPATH=/opt/mdyalog/19.0/64/unicode/ws
export TERM=dumb
export APL_TEXTINAPLCORE=${APL_TEXTINAPLCORE-1}
export TRACE_ON_ERROR=${TRACE_ON_ERROR-0}
export LOAD=$JARVIS/Source
export SESSION_FILE="${SESSION_FILE-$DYALOG/default.dse}"
## if either CodeLocation or JarvisConfig are set, use them
if [ -z "${CodeLocation}" ] && [ -z "${JarvisConfig}" ]; then
if [ $(ls /app | grep "jarvis.json" 2>/dev/null | wc -l) -eq 1 ]; then
echo "Application config found in /app/jarvis.json"
export JarvisConfig=/app/$(ls /app | grep "jarvis.json")
elif [ $(ls /app 2>/dev/null | wc -l) -gt 0 ]; then
echo "Application code found in /app."
CODEL=/app
else
echo "No application found in /app. Running with sample app"
CODEL=$JARVIS/Samples/JSON
fi
export CodeLocation=${CodeLocation-$CODEL}
fi
cd /app
if [ -n "$RIDE_INIT" ]; then
$DYALOG/dyalog +s -q
else
$DYALOG/dyalog -s
fi