Skip to content

Commit 21d1db2

Browse files
authored
Modify install script for app installation (#26)
Updated comments and changed app restart command to start.
1 parent 02fd10f commit 21d1db2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

install.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e # Exit immediately if any command fails
44

5-
# Get latest release zip URL and download
5+
# Get the latest release zip URL and download
66
ZIP_URL=$(curl -s "https://api.github.com/repos/dido18/scratch-arduino-app/releases/latest" | \
77
grep '"browser_download_url": "[^"]*\.zip"' | \
88
cut -d'"' -f4 | head -n1)
@@ -19,13 +19,16 @@ echo "Downloading: $ZIP_NAME"
1919
cd /tmp
2020
curl -sL "$ZIP_URL" -o app.zip
2121

22+
# before deleting the folder, stop it
23+
arduino-app-cli app stop user:scratch-arduino-app
24+
2225
unzip -q app.zip
2326
rm -rf $HOME/ArduinoApps/scratch-arduino-app
2427
mv -f scratch-arduino-app $HOME/ArduinoApps/
2528
rm -f app.zip
2629

2730
echo "Installation completed: $ZIP_NAME installed at $HOME/ArduinoApps/scratch-arduino-app"
2831

29-
arduino-app-cli app restart user:scratch-arduino-app
32+
arduino-app-cli app start user:scratch-arduino-app
3033
arduino-app-cli properties set default user:scratch-arduino-app
31-
echo "Application restarted and set as default."
34+
echo "Application restarted and set as default."

0 commit comments

Comments
 (0)