-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun.sh
More file actions
32 lines (28 loc) · 734 Bytes
/
run.sh
File metadata and controls
32 lines (28 loc) · 734 Bytes
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
#!/bin/bash -xv
export ZYPAK_APP_IMAGE_PATH=/app
export ZYPAK_APP_PATH=/app/
function errmsg() {
>&2 echo "flatpak-t3codes: $*"
}
# Activate any enabled SDK extensions
if [[ "$FLATPAK_ENABLE_SDK_EXT" == "*" ]]; then
SDK=()
for d in /usr/lib/sdk/*; do
SDK+=("${d##*/}")
done
else
IFS=',' read -ra SDK <<<"$FLATPAK_ENABLE_SDK_EXT"
fi
for i in "${SDK[@]}"; do
if [[ -d /usr/lib/sdk/$i ]]; then
errmsg "Enabling SDK extension \"$i\""
if [[ -f "/usr/lib/sdk/$i/enable.sh" ]]; then
. "/usr/lib/sdk/${i}/enable.sh"
else
export PATH=$PATH:/usr/lib/sdk/$i/bin
fi
else
errmsg "Requested SDK extension \"$i\" is not installed"
fi
done
exec /app/bin/zypak-wrapper /app/t3-code-desktop "$@"