Forked from anonymous/install_usb-to-ethernet_driver.sh
Last active
August 29, 2015 14:27
-
-
Save fiskr/feda3dce7fd41b4f431f to your computer and use it in GitHub Desktop.
Install USB 3.0 Cable Matters driver for OSX
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/bash | |
# this is for the Ethernet to USB 3.0 adapter | |
# made by Cable Matters | |
cd ~/ | |
mkdir -p cable-matters-temp | |
cd cable-matters-temp | |
curl -L http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_Macintosh_10.6_to_10.11_Driver_Installer_v2.5.0_20150727.zip -o AX88179_178A_Macintosh_10.6_to_10.11_Driver_Installer_v2.5.0_20150727.zip | |
unzip AX88179_178A_Macintosh_10.6_to_10.11_Driver_Installer_v2.5.0_20150727.zip | |
cd AX88179_178A_Macintosh_10.6_to_10.11_Driver_Installer_v2.5.0_20150727 | |
dmgFile="$(ls | grep .dmg | head -n 1)" | |
hdiutil attach $dmgFile | |
cd /Volumes/AX88179 | |
rm -rf ~/cable-matters-temp | |
pkgFile="$(ls | grep .pkg | head -n 1)" | |
open $pkgFile | |
function detachMount(){ | |
if [ $? -eq 0 ] && [[ $(ps -ef | grep Installer | grep -v grep) == "" ]]; then | |
devMount="$(hdiutil info | grep AX88179 | tail -n 1 | awk '{print $1}')" | |
hdiutil detach $devMount | |
else | |
sleep 5 | |
detachMount | |
fi | |
} | |
detachMount | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment