andreafabrizi/Dropbox-Uploader — pull request #76 by tjluoma (2013-08-21 21:44:00+00:00)
Title: Mac OS X's `readlink` doesn't support '-m'

Just checking for `readlink` on Mac OS X isn't enough. We have to look for `greadlink` (or GNU's `readlink`) which users can install via Homebrew.

I added a simple `case` statement for comparing the output of `uname` to see if we are on Mac OS X (aka 'Darwin' according to `uname`). The `case` should also make it easier to add checks for other OSes if needed. The case statement sets the variable `${READLINK}` to `greadlink` on Darwin, but leaves it as `readlink` for any other OS.

I then replaced any occurrence of `readlink` with ${READLINK}

OH! And I changed "DU=" to use `which` to look for `dropbox_uploader.sh` anywhere in the user's $PATH rather than having to be set manually.

I think that's it.

(Sorry if I did any of this wrong, I don't really know `git` all that well, in fact this is my first pull request. Feel free to ignore if I screwed something up or if you choose not to care about Mac OS X.)