mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-15 12:05:01 +08:00
28 lines
641 B
Bash
Executable File
28 lines
641 B
Bash
Executable File
#!/bin/sh
|
|
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
ROOT_DIR="$(cd "${DIR}/../.." && pwd)"
|
|
|
|
device_type() {
|
|
if [ -f /sys/firmware/devicetree/base/model ]; then
|
|
tr -d '\000' </sys/firmware/devicetree/base/model 2>/dev/null | sed 's/.*comma //'
|
|
fi
|
|
}
|
|
|
|
if [ -f /TICI ]; then
|
|
DT="$(device_type)"
|
|
if [ "${DT}" != "tici" ] && [ "${DT}" != "tizi" ]; then
|
|
PYTHON="${ROOT_DIR}/.venv/bin/python"
|
|
if [ ! -x "${PYTHON}" ]; then
|
|
PYTHON="python3"
|
|
fi
|
|
exec "${PYTHON}" "${ROOT_DIR}/system/ui/text.py" "$1"
|
|
fi
|
|
|
|
if [ ! -f "${DIR}/_text" ]; then
|
|
cp "${DIR}/qt/text_larch64" "${DIR}/_text"
|
|
fi
|
|
fi
|
|
|
|
exec "${DIR}/_text" "$1"
|