- 
      
 - 
        
Save bdx0/7cae7de8e2240cc0ca39a35f227a7923 to your computer and use it in GitHub Desktop.  
    Unison install
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # 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