Skip to content

Commit 3676fa2

Browse files
scripts/install.sh: add oneapp mode
1 parent e43407a commit 3676fa2

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

scripts/install.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
pkill -f "python.*mpremote"
22

3+
appname="$1"
4+
35
pushd internal_filesystem/
46

7+
if [ ! -z "$appname" ]; then
8+
echo "Installing one app: $appname"
9+
appdir="apps/com.example.$appname/"
10+
if [ ! -d "$appdir" ]; then
11+
echo "$appdir doesn't exist so taking the builtin/"
12+
appdir="builtin/apps/com.example.$appname/"
13+
if [ ! -d "$appdir" ]; then
14+
echo "$appdir also doesn't exist, exiting..."
15+
exit 1
16+
fi
17+
fi
18+
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r "$appdir" :/apps/
19+
echo "start_app(\"/$appdir\")"
20+
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py
21+
popd
22+
exit
23+
fi
24+
25+
526
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp boot.py :/boot.py
627
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp main.py :/main.py
728

0 commit comments

Comments
 (0)