Skip to content

Commit 4416931

Browse files
Make install.sh script generic
1 parent b44720c commit 4416931

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

scripts/install.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
pkill -f "python.*mpremote"
22

3-
appname="$1"
3+
target="$1"
4+
appname="$2"
45

5-
if [ -z "$appname" ]; then
6-
echo "Usage: $0 [appname]"
6+
if [ -z "$target" -o -z "$appname" ]; then
7+
echo "Usage: $0 [target] [appname]"
78
echo "Example: $0"
8-
echo "Example: $0 launcher"
9-
echo "Example: $0 wificonf"
10-
echo "Example: $0 appstore"
9+
echo "Example: $0 fri3d-2024 wifi"
10+
echo "Example: $0 fri3d-2024 appstore"
11+
echo "Example: $0 waveshare-esp32-s3-touch-lcd-2 launcher"
12+
echo "Example: $0 waveshare-esp32-s3-touch-lcd-2 imu"
1113
sleep 2
1214
fi
1315

16+
17+
1418
mpremote=~/projects/MicroPythonOS/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py
1519

1620
pushd internal_filesystem/
@@ -39,8 +43,11 @@ if [ ! -z "$appname" ]; then
3943
fi
4044

4145

42-
#$mpremote fs cp boot.py :/boot.py
43-
$mpremote fs cp boot_fri3d-2024.py :/boot.py
46+
if [ -z "$target" -o "$target" == "waveshare-esp32-s3-touch-lcd-2" ]; then
47+
$mpremote fs cp boot.py :/boot.py
48+
else
49+
$mpremote fs cp boot_"$target".py :/boot.py
50+
fi
4451
$mpremote fs cp main.py :/main.py
4552

4653
#$mpremote fs cp main.py :/system/button.py

0 commit comments

Comments
 (0)