diskOS installer: initial public beta
Flashes the diskOS custom UI onto the FiiO Snowsky Disc over Ingenic mask-ROM USB, building the image from your own stock firmware. Runs from source via install.sh.
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# diskOS installer launcher. Runs the installer from source using the local .venv (created by
|
||||
# ./install.sh); falls back to the system python3 if no venv is present. Pass any subcommand
|
||||
# straight through, e.g. ./diskos-installer doctor or ./diskos-installer gui
|
||||
set -eu
|
||||
HERE=$(CDPATH= cd "$(dirname "$0")" && pwd)
|
||||
|
||||
if [ -x "$HERE/.venv/bin/python" ]; then PY="$HERE/.venv/bin/python"
|
||||
elif [ -x "$HERE/.venv/Scripts/python.exe" ]; then PY="$HERE/.venv/Scripts/python.exe"
|
||||
elif command -v python3 >/dev/null 2>&1; then PY=$(command -v python3)
|
||||
elif command -v python >/dev/null 2>&1; then PY=$(command -v python)
|
||||
else
|
||||
echo "diskos-installer: no Python 3 found. Run ./install.sh first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make the diskos_installer package importable regardless of the caller's working directory,
|
||||
# without changing it (so relative --firmware paths still resolve against where the user is).
|
||||
PYTHONPATH="$HERE${PYTHONPATH:+:$PYTHONPATH}"
|
||||
export PYTHONPATH
|
||||
exec "$PY" -m diskos_installer "$@"
|
||||
Reference in New Issue
Block a user