Can we do something like:
```bash
if [ ! -x "$B2G_DESKTOP_PATH" ] ; then
  # set the path for Mac OS X
  ...
fi
# if we still don't have it, fail
if [ ! -x "$B2G_DESKTOP_PATH" ] ; then
  echo error message
  exit 1
fi
```