@@ -9,25 +9,31 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
9
9
EOF
10
10
}
11
11
12
- if [ " $EUID " -ne 0 ]; then
13
- if [ -e " ${PWD} /post_install.sh" ]; then
14
- echo
15
- echo " You might need to configure permissions for uploading."
16
- echo " To do so, run the following command from the terminal:"
17
- echo " sudo \" ${PWD} /post_install.sh\" "
18
- echo
19
- else
20
- # Script was executed from another path. It is assumed this will only occur when user is executing script directly.
21
- # So it is not necessary to provide the command line.
22
- echo " Please run as root"
12
+ OS=" $( uname -s) "
13
+ case " $OS " in
14
+ Linux* )
15
+ if [ " $EUID " -ne 0 ]; then
16
+ if [ -e " ${PWD} /post_install.sh" ]; then
17
+ echo
18
+ echo " You might need to configure permissions for uploading."
19
+ echo " To do so, run the following command from the terminal:"
20
+ echo " sudo \" ${PWD} /post_install.sh\" "
21
+ echo
22
+ else
23
+ # Script was executed from another path. It is assumed this will only occur when user is executing script directly.
24
+ # So it is not necessary to provide the command line.
25
+ echo " Please run as root"
26
+ fi
27
+
28
+ exit
23
29
fi
24
30
25
- exit
26
- fi
31
+ arduino_renesas_core_rules > /etc/udev/rules.d/60-arduino-renesas.rules
27
32
28
- arduino_renesas_core_rules > /etc/udev/rules.d/60-arduino-renesas.rules
33
+ # reload udev rules
34
+ echo " Reload rules..."
35
+ udevadm trigger
36
+ udevadm control --reload-rules
29
37
30
- # reload udev rules
31
- echo " Reload rules..."
32
- udevadm trigger
33
- udevadm control --reload-rules
38
+ ;;
39
+ esac
0 commit comments