From 3676fa28daf246996ad4a78b6030c79bb505fc3e Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Wed, 7 May 2025 10:38:40 +0200 Subject: [PATCH] scripts/install.sh: add oneapp mode --- scripts/install.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index 95a5b612..25b62286 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,7 +1,28 @@ pkill -f "python.*mpremote" +appname="$1" + pushd internal_filesystem/ +if [ ! -z "$appname" ]; then + echo "Installing one app: $appname" + appdir="apps/com.example.$appname/" + if [ ! -d "$appdir" ]; then + echo "$appdir doesn't exist so taking the builtin/" + appdir="builtin/apps/com.example.$appname/" + if [ ! -d "$appdir" ]; then + echo "$appdir also doesn't exist, exiting..." + exit 1 + fi + fi + ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r "$appdir" :/apps/ + echo "start_app(\"/$appdir\")" + ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py + popd + exit +fi + + ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp boot.py :/boot.py ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp main.py :/main.py