Created
February 4, 2018 20:28
-
-
Save hall757/19e5a0006198362db81d52cf24eb84e2 to your computer and use it in GitHub Desktop.
Enable Apple Superdrive on Google PIxelbook dev mode
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
# From my .bashrc | |
# Thanks to https://github.com/onmomo/superdrive-enabler | |
SDE=/usr/local/sbin/superdriveEnabler | |
if [ ! -f $SDE ]; then | |
curl -s -o $SDE https://raw.githubusercontent.com/onmomo/superdrive-enabler/master/dist/x86_64/superdriveEnabler_x86_64 | |
chmod a+x $SDE | |
fi | |
SDERULES=/etc/udev/rules.d/99-superdrive.rules | |
if [ -f $SDE ]&&[ ! -f $SDERULES ]; then | |
echo '# Initialise Apple SuperDrive with superdrive-enabler' > /tmp/sderules | |
echo "ACTION==\"add\", ATTRS{idProduct}==\"1500\", ATTRS{idVendor}==\"05ac\", DRIVERS==\"usb\", RUN+=\"$SDE /dev/\$kernel\"" >> /tmp/sderules | |
sudo mv /tmp/sdrules $SDERULES | |
fi | |
unset SDE | |
unset SDERULES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment