Skip to content

Instantly share code, notes, and snippets.

@hall757
Created February 4, 2018 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hall757/19e5a0006198362db81d52cf24eb84e2 to your computer and use it in GitHub Desktop.
Save hall757/19e5a0006198362db81d52cf24eb84e2 to your computer and use it in GitHub Desktop.
Enable Apple Superdrive on Google PIxelbook dev mode
# 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