Created
August 21, 2015 10:36
-
-
Save teknoraver/6a5f8a9fd89253e5bcb9 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
rulefile=/etc/udev/rules.d/51-android.rules | |
url=http://developer.android.com/tools/device.html | |
rule='/<td><code>....<\/code><\/td>/{print "SUBSYSTEM==\"usb\", ATTR{idVendor}==\""$5"\", MODE=\"0660\", GROUP=\"plugdev\""}' | |
curl -s $url | awk -F'<|>' "$rule" >$rulefile | |
chmod 755 $rulefile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment