Last active
October 12, 2017 15:31
-
-
Save featherbear/a6b307175cfc09c2eaeb80ccb3d6dff8 to your computer and use it in GitHub Desktop.
Install ntfs-3g driver on Mac
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 | |
echo Installing ntfs-3g driver! Notice, computer will restart twice during installation | |
if [ $EUID -ne 0 ]; then | |
echo Requesting sudo! | |
exec sudo $0 | |
fi | |
echo Disabling system integrity protection | |
csrutil disable | |
echo Creating restart script | |
cat > /var/install_ntfs3g.sh << :EOF | |
/usr/bin/ruby -e "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew cask install osxfuse -y | |
brew install ntfs-3g -y | |
mv /sbin/mount_ntfs /sbin/mount_ntfs.original | |
ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs | |
crontab -l | grep -v 'sh /var/install_ntfs3g.sh' | crontab - | |
csrutil enable | |
reboot | |
:EOF | |
chmod a+x /var/install_ntfs3g.sh | |
(crontab -l ; echo "@reboot sh /var/install_ntfs3g.sh") | crontab - | |
echo Restarting | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment