run_desktop: backup and restore config file

This commit is contained in:
Thomas Farstrike
2025-12-17 14:45:16 +01:00
parent 4b9a147deb
commit c944e6924e
3 changed files with 170 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
find internal_filesystem -iname "*.pyc" -exec rm {} \;
+2
View File
@@ -62,9 +62,11 @@ if [ -f "$script" ]; then
"$binary" -v -i "$script"
else
echo "Running app $script"
mv data/com.micropythonos.settings/config.json data/com.micropythonos.settings/config.json.backup
# When $script is empty, it just doesn't find the app and stays at the launcher
echo '{"auto_start_app": "'$script'"}' > data/com.micropythonos.settings/config.json
"$binary" -X heapsize=$HEAPSIZE -v -i -c "$(cat main.py)"
mv data/com.micropythonos.settings/config.json.backup data/com.micropythonos.settings/config.json
fi
popd