Created
August 14, 2013 09:42
-
-
Save vladkorotnev/6229470 to your computer and use it in GitHub Desktop.
Shared Code Snippets for Xcode across multiple Macintoshes
This file contains hidden or 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
First, create a folder (for example "Code snippets") in your Dropbox or whatever syncs. | |
Place connect_this_mac.sh into that folder. | |
Next, inside the folder you made and put the script into, make a folder named "stash". | |
Run connect_this_mac.sh. All the snippets get copied into the stash and synced. | |
From now on snippets will autosync. No need to restart the script. | |
-- vladkorotnev 2013 |
This file contains hidden or 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 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd "$DIR" | |
mv ~/Library/Developer/Xcode/UserData/CodeSnippets/* stash | |
rm -rf ~/Library/Developer/Xcode/UserData/CodeSnippets | |
ln -s "$DIR/stash" ~/Library/Developer/Xcode/UserData/CodeSnippets | |
echo This Macintosh should now be successfully sharing the snippets with other connected Macs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment