I have come up with this blog post to give straight forward steps to setup Force.com Migration tool on mac.
First of all, we have to install HomeBrew, package manager of OS X. It helps to install stuff you need that Apple didn't. This can be done by running following command in Terminal:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Second, We have to install Ant through HomeBrew. Following command does this job:
brew install ant
A plus point installing Ant with HomeBrew is that We don't need to set environment variables or path manually. Brew does that for us.
Now to test if ant installed successfully or not, just write 'ant' on terminal. This should give you error something like 'build.xml does not exist!'. This means your ant is successfully installed on your mac.
lkat-mpro:~ lkatney$ ant Buildfile: build.xml does not exist! Build failed lkat-mpro:~ lkatney$
Now as a third step, we need to add ant-salesforce.jar to ant's lib folder.
This ant-salesforce.jar can be downloaded from any Salesforce Organization under Develop | Tools by clicking on Force.com Migration Tool link. See attached screenshot below:
After getting jar file from salesforce, We need to add it into ant's lib folder. Homebrew installs packages to their own directory and then symlinks their files into /usr/local. so you can directly find ant folder by following this path.
or Directly go to Finder in your mac and choose Go to Folder option and place above url. This wil give ant folder installed in your directory.
Now go to its libexec folder and add jar file into its lib folder.
This completes your set up for Force.com Migration Tool. Now your tool is up & running and you can do some sample deployments for testing.