Created
February 5, 2016 06:13
-
-
Save matthewbodaly/cd666383de8bd064780e to your computer and use it in GitHub Desktop.
Google Drive doesn't natively support external drives. My initial seed was on an external drive. This script / method isn't perfect as Google Drive did throw a few errors... well more than a few and I had to disconnect / reconnect a few times.
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 | |
#get current username | |
currentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");') | |
#do thing | |
mkdir /Users/$currentUser/Google\ Drive | |
ln -s /Volumes/DataDrive/Google\ Drive/ /Users/$currentUser/Google\ Drive/ | |
# one version of running the script this way works.... other times, ran into errors | |
# rm -rf /Users/$currentUser/Google\ Drive/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment