Skip to content

Commit bf546df

Browse files
install.sh: adapt to unified builds
1 parent 54f11e5 commit bf546df

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

scripts/install.sh

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ mydir=$(dirname "$mydir")
33

44
pkill -f "python.*mpremote"
55

6-
target="$1"
7-
appname="$2"
8-
9-
if [ -z "$target" ]; then
10-
echo "Usage: $0 <target> [appname]"
11-
echo "Example: $0 fri3d-2024"
12-
echo "Example: $0 waveshare-esp32-s3-touch-lcd-2"
13-
echo "Example: $0 fri3d-2024 appstore"
14-
echo "Example: $0 waveshare-esp32-s3-touch-lcd-2 imu"
15-
exit 1
16-
fi
17-
6+
appname="$1"
187

8+
echo "This script will install the important files from internal_filesystem/ on the device using mpremote.py"
9+
echo
10+
echo "Usage: $0 [appname]"
11+
echo "Example: $0"
12+
echo "Example: $0 com.micropythonos.about"
1913

2014
mpremote=$(readlink -f "$mydir/../lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py")
2115

@@ -44,17 +38,7 @@ if [ ! -z "$appname" ]; then
4438
exit
4539
fi
4640

47-
48-
#if [ -z "$target" -o "$target" == "waveshare-esp32-s3-touch-lcd-2" ]; then
49-
# $mpremote fs cp boot.py :/boot.py
50-
#else
51-
# $mpremote fs cp boot_"$target".py :/boot.py
52-
#fi
53-
#$mpremote fs cp main.py :/main.py
54-
55-
#$mpremote fs cp main.py :/system/button.py
56-
#$mpremote fs cp autorun.py :/autorun.py
57-
#$mpremote fs cp -r system :/
41+
# boot.py is not copied because it can't be overridden anyway
5842

5943
# The issue is that this brings all the .git folders with it:
6044
#$mpremote fs cp -r apps :/
@@ -68,9 +52,10 @@ find apps/ -maxdepth 1 -type l | while read symlink; do
6852

6953
done
7054

55+
echo "Unmounting builtin/ so that it can be customized..." # not sure this is necessary
56+
$mpremote exec "import os ; os.umount('/builtin')"
7157
$mpremote fs cp -r builtin :/
7258
$mpremote fs cp -r lib :/
73-
#$mpremote fs cp -r resources :/
7459

7560
#$mpremote fs cp -r data :/
7661
#$mpremote fs cp -r data/images :/data/
@@ -81,10 +66,8 @@ popd
8166
echo "Installing test infrastructure..."
8267
$mpremote fs mkdir :/tests
8368
$mpremote fs mkdir :/tests/screenshots
84-
testdir=$(readlink -f "$mydir/../tests")
85-
$mpremote fs cp "$testdir/graphical_test_helper.py" :/tests/graphical_test_helper.py
8669

87-
if [ -z "$appname" ]; then
70+
if [ ! -z "$appname" ]; then
8871
echo "Not resetting so the installed app can be used immediately."
8972
$mpremote reset
9073
fi

0 commit comments

Comments
 (0)