jasonwryan.com

Miscellaneous ephemera…

Using Dropbox to Share Dotfiles

I regularly back up all my dotfiles to Dropbox as a matter of course. I had intended, at some point, to set up a Git repo to automate the process and to make it easier to share these files with others.

However, best intentions etc., in the end it was far easier to simply extend what I was already doing using Dropbox.

First, I created a directory in my Dropbox/Public that would contain the dotfiles I wanted to share:

1
$ mkdir Dropbox/Public/Configs

Then it was just a matter of creating links to the files I wanted to host there:

1
2
3
$ cd Dropbox/Public/Configs
$ ln -s ../../path/to/dotfile

The next step was to create a simple HTML page (and a stylesheet to make it look presentable) and drop them into the same directory.

Caveat

Dropbox has the very handy feature of retaining versions of all the files you upload. Unfortunately, in this case, that means that the symlinks will always point to the file that you originally set them at — irrespective of any updates you overwrite them with.

So, if you change any of the files significantly, you will need to recreate the symlink…

Update

It seems that the symlink system does work: Dropbox will respect the latest version. YMMV.

Comments