Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

"Portable" TextWrangler with Dropbox Apps
I love TextWrangler, and I have a Mac at work and one at home, but often do coding on both. I set up a system using Dropbox so both my preferences and my Application Support files sync so I always have my stationery files and the same settings, wherever I am.

Run the following as a shell script on each of the Macs. This will copy TextWrangler to your Dropbox folder, and create the support folder on Dropbox, then create a symlink to it in the correct location on your Macs. It will then copy the preference files to Dropbox, so when you launch the application on either Mac, you'll have the same setup.
#+ Portable TextWrangler

#* Formatted date & time string.
FORMATTED_DATE=`/bin/date "+%Y-%m-%d%H%M%S"`

#+ Remove it from /Applications (optional, just so you can replace it with a ln to your dropbox)
sudo /bin/mv -f /Applications/ ~/.Trash/

#* Add a link in /Applications to your DropBox copy
sudo /bin/ln -Fs ~/DropBox/ /Applications/

#* Archive existing folder
/bin/mv -f ~/Library/Application Support/TextWrangler{,.$FORMATTED_DATE}

#+ Create cloud app support folder
/bin/mkdir -p ~/DropBox/TextWrangler

#+ Link cloud app support folder to your local workstation (this contains your stationery, etc.)
sudo /bin/ln -Fs ~/DropBox/TextWrangler ~/Library/Application Support/TextWrangler

#+ Create cloud app support folder for your preferences
/bin/mkdir -p ~/DropBox/TextWrangler/Preferences

#* Placeholder so your prefs go to the cloud
/usr/bin/defaults write ~/DropBox/TextWrangler/Preferences/com.barebones.textwrangler Placeholder true

#* Link cloud pref to your local workstation
sudo /bin/ln -Fs ~/DropBox/TextWrangler/Preferences/com.barebones.textwrangler.plist ~/Library/Preferences/com.barebones.textwrangler.plist

exit 0
[kirkmc adds: Personally, I wouldn't do it this way. For example, I don't see why you would copy the application itself to Dropbox; you can just have a copy on each Mac. You also might not want to have the preferences the same on both Macs, if one is a desktop and the other a laptop. So all that leaves is the support folder, which is easy to symlink.

If you want to do this with BBEdit, it's much simpler. As explained on the Bare Bones web site, BBEdit will look for the support folder on your Dropbox folder.]
  • Currently 2.00 / 5
  You rated: 2 / 5 (6 votes cast)

"Portable" TextWrangler with Dropbox | 4 comments | Create New Account
Click here to return to the '"Portable" TextWrangler with Dropbox' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"Portable" TextWrangler with Dropbox
Authored by: Fischmuetze on May 17, '12 08:33:54AM

Useless! I have no idea for what it should be more comfortable than to have the app in the app folder self. The idea of "portable" apps is to just start an application from a stick without any installation and with the settings on the stick (or i.e. in a cloud) But you manipulate each of the involved systems. kirkmc made a description for syncing the settings

[ Reply to This | # ]
"Portable" TextWrangler with Dropbox
Authored by: Reaperducer on May 17, '12 12:02:45PM

There are situations and companies where you can't just copy the application to every computer you use. One place I worked had several hundreds computers, and depending on what you were doing from one day to the next, you never knew which machine you'd be on.

Fortunately, the computers' USB ports weren't locked down, so you could carry a flash drive on your keychain. The problem is that so many Mac applications unnecessarily make use of ~Library files, so we were limited with what we could have on the stick.

Even though I once found someone's USB stick that had fallen off their keychain, I'd still feel better having the files with me than on a cloud service. Even 99.9% uptime on an internet connection leaves a lot of minutes of darkness.

[ Reply to This | # ]
"Portable" TextWrangler with Dropbox
Authored by: bcarter5876 on May 18, '12 05:23:35AM

Is that even going to work properly with the unescaped space in Application Support?

[ Reply to This | # ]
"Portable" TextWrangler with Dropbox
Authored by: leamanc on May 19, '12 01:45:50PM

Nope. The script will error out with something along the lines of ".../Application: No such file or directory."

And it won't work with the $ instead of a $.

[ Reply to This | # ]