Skip to content

Instantly share code, notes, and snippets.

@genvagula
Forked from jbeda/01 Install Unison Linux
Created April 6, 2019 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genvagula/2dc99f013fdc9dfa066c76e419f27891 to your computer and use it in GitHub Desktop.
Save genvagula/2dc99f013fdc9dfa066c76e419f27891 to your computer and use it in GitHub Desktop.
Unison install
# linux
UNISON_VERSION=2.48.4
sudo apt-get -y install inotify-tools ocaml-nox build-essential
curl -L https://github.com/bcpierce00/unison/archive/${UNISON_VERSION}.tar.gz | tar zxv -C /tmp
cd /tmp/unison-${UNISON_VERSION}
sed -i -e 's/GLIBC_SUPPORT_INOTIFY 0/GLIBC_SUPPORT_INOTIFY 1/' src/fsmonitor/linux/inotify_stubs.c
make UISTYLE=text NATIVE=true STATIC=true
cp src/unison src/unison-fsmonitor ~/bin
# You should modify your path to include ~/bin
# macOS
brew install unison
curl "https://raw.githubusercontent.com/hnsl/unox/master/unox.py" -o "/usr/local/bin/unison-fsmonitor"
chmod +x /usr/local/bin/unison-fsmonitor
pip install macfsevents
# This goes in ~/.unison
# automatically accept default (nonconflicting) actions
auto = true
# batch mode: ask no questions at all
batch = true
# Keep going based on watching files
repeat = watch
# Don't try and sync OSX resource forks
rsrc = false
log = false
terse = true
ignore = Name ._*
ignore = Regex .*/kubernetes/build
ignore = Regex (^|/)go/(pkg|bin)
# Activate with `unison gcp-ws`
# Assumes you have an entry in your ~/.ssh/config set up for `gcp-ws`
include auto-base
root = /Users/jbeda/unison/gcp-ws
root = ssh://gcp-ws//home/jbeda/src
# this is part of ~/.ssh/config
Host gcp-ws
User jbeda
HostName 1.2.3.4
IdentityFile ~/.ssh/google_compute_engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment