-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from seaxwi/post-install.sh
New post_install.sh script that works for Nano Every
- Loading branch information
Showing
2 changed files
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
megaAVR_rules () { | ||
echo "" | ||
echo "# Arduino Mega AVR boards bootloader mode udev rules" | ||
echo "" | ||
cat <<EOF | ||
# Arduino UNO WiFi Rev2 | ||
SUBSYSTEMS=="tty", ENV{ID_REVISION}=="03eb", ENV{ID_MODEL_ID}=="2145", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_CANDIDATE}="0" | ||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2145", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
# Arduino Nano Every | ||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0058", MODE:="0666" | ||
EOF | ||
} | ||
|
||
if [ "$EUID" -ne 0 ] | ||
then echo "Please run as root" | ||
exit | ||
fi | ||
|
||
megaAVR_rules > /etc/udev/rules.d/60-arduino-megaAVR.rules | ||
|
||
# reload udev rules | ||
echo "Reload rules..." | ||
udevadm control --reload-rules | ||
udevadm trigger | ||
|
This file was deleted.
Oops, something went wrong.