File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -189,21 +189,23 @@ tasks:
189189
190190 board:install-arduino-app-cli :
191191 desc : Install arduino-app-cli on the board
192+ interactive : true
192193 cmds :
193194 - rm ./build/*.deb || true
194195 - task : build-deb:arduino-app-cli
195196 - adb shell rm /tmp/*.deb || true
196197 - adb push ./build/arduino-app-cli_*_arm64.deb /tmp/
197- - adb shell dpkg -i /tmp/arduino-app-cli*_arm64.deb
198+ - ./scripts/run-remote-sudo.sh " dpkg -i /tmp/arduino-app-cli*_arm64.deb && needrestart -r a"
198199
199200 board:install-router :
200201 desc : Install arduino-router on the board
202+ interactive : true
201203 cmds :
202204 - rm ./build/*.deb || true
203205 - task : build-deb:arduino-router
204206 - adb shell rm /tmp/*.deb || true
205207 - adb push ./build/arduino-router_*_arm64.deb /tmp/
206- - adb shell dpkg -i /tmp/arduino-router_*_arm64.deb
208+ - ./scripts/run-remote-sudo.sh " dpkg -i /tmp/arduino-router_*_arm64.deb && needrestart -r a"
207209
208210 setup:examples:local :
209211 desc : Download and locally install the official examples
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Runs a command as sudo on the board (adb shell), while prompting for the password interactively.
4+ # To be used in the taskfile.
5+
6+ read -s -p " Enter device sudo password: " SUDO_PASS
7+ echo
8+
9+ # Run the command remotely with sudo, piping the password
10+ echo " $SUDO_PASS " | adb shell " sudo -S sh -c \" $* \" "
You can’t perform that action at this time.
0 commit comments