For developing on remote servers, but using a local IDE, I prefer to use Unison over other methods that rely on syncing files via rsync or SFTP.
But, one issue with Unison is that two computers must have the same version to sync. And since Homebrew installs Unison
apt-get install unison installs something like
2.0.x, this meant I couldn’t sync between my computer and a development machine if I wanted to install Unison via
No worries, by following the documentation, and a bit more searching, I was able to figure out how to build Unison 2.48.4 on my development server!
Note: I did run into a warning at the end of the build. But, from what I can tell, the build actually succeeded. The second-to-last step below helps you test if the build succeeded.
apt-get install ocaml
apt-get install make
curl -O curl -O https://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.48.4.tar.gz
tar -xvzf unison-2.48.4.tar.gz
./unisonto make sure it built correctly. You should see something like this:
Usage: unison [options] or unison root1 root2 [options] or unison profilename [options] For a list of options, type "unison -help". For a tutorial on basic usage, type "unison -doc tutorial". For other documentation, type "unison -doc topics".
mv unison /usr/local/bin
After going through these commands,
unison should be in your path, so you should be able to use
unison from any directory without specifying the location of the binary.