github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/build/bootstrap/bootstrap-unison.sh (about)

     1  #!/usr/bin/env bash
     2  #
     3  # On a Debian/Ubuntu system, bootstraps the Unison file-syncer.
     4  
     5  set -euxo pipefail
     6  
     7  sudo apt-get install -y --no-install-recommends ocaml-nox
     8  
     9  # Ubuntu's "unison" package does not ship unison-fsmonitor, which is needed for
    10  # the "-repeat watch" option to function properly.
    11  git clone --branch=v2.51.2 https://github.com/bcpierce00/unison
    12  (cd unison && make)
    13  for bin in unison unison-fsmonitor; do
    14    sudo install -m 755 "unison/src/$bin" "/usr/local/bin/$bin"
    15  done
    16  
    17  echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/60-max-user-watches.conf
    18  sudo service procps restart
    19  
    20  echo "UNISONLOCALHOSTNAME=$(hostname)-$(date +%Y%m%d-%H%M%S)" | sudo tee -a /etc/environment