Skip to content

Commit 5e639ee

Browse files
authored
Merge pull request #129 from seaxwi/post-install.sh
New post_install.sh script that works for Nano Every
2 parents ffab9cb + aa477bb commit 5e639ee

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

post_install.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
3+
megaAVR_rules () {
4+
echo ""
5+
echo "# Arduino Mega AVR boards bootloader mode udev rules"
6+
echo ""
7+
cat <<EOF
8+
# Arduino UNO WiFi Rev2
9+
SUBSYSTEMS=="tty", ENV{ID_REVISION}=="03eb", ENV{ID_MODEL_ID}=="2145", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_CANDIDATE}="0"
10+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2145", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
11+
12+
# Arduino Nano Every
13+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0058", MODE:="0666"
14+
EOF
15+
}
16+
17+
if [ "$EUID" -ne 0 ]
18+
then echo "Please run as root"
19+
exit
20+
fi
21+
22+
megaAVR_rules > /etc/udev/rules.d/60-arduino-megaAVR.rules
23+
24+
# reload udev rules
25+
echo "Reload rules..."
26+
udevadm control --reload-rules
27+
udevadm trigger
28+

scripts/create_dfu_udev_rule

-17
This file was deleted.

0 commit comments

Comments
 (0)