Woojong Koh avatar Woojong Koh committed a14a7c0

Add Back to My Mac (SSH) and xcodebuild settings to bootstrap_mac.sh

Comments (0)

Files changed (2)

 		tmux new-session -s $SESSION
 	fi
 fi
+
+# Back to My Mac (SSH)
+if [ -f ~/Dropbox/Mac\ Sync/.hostnames ]; then
+    source ~/Dropbox/Mac\ Sync/.hostnames
+fi
 #!/bin/sh
+
+xcodebuild -license
+sudo xcodebuild -license
+
 sudo port selfupdate
 sudo port install autojump
 sudo port install ccache
 sudo port install freetype
 
 # install MacVim
+
+# Back to My Mac (SSH)
+HOSTNAME=`hostname -s`
+HOSTNAME_CLEANED=${HOSTNAME//-/_}
+ICLOUD_DOMAIN=`echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'`
+EXPORT_STMT="export $HOSTNAME_CLEANED=$HOSTNAME.$ICLOUD_DOMAIN"
+HOSTNAMES_FILE="$HOME/Dropbox/Mac Sync/.hostnames"
+
+if ! grep "$EXPORT_STMT" "$HOSTNAMES_FILE" > /dev/null; then
+    echo $EXPORT_STMT >> $HOSTNAMES_FILE
+fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.