Skip to content

Instantly share code, notes, and snippets.

Created January 5, 2016 10:37
What would you like to do?
# by: Johan Carlin
# date: 8/9/2014
# purpose: sync folders between computers. Assumes that both are available
# on the local network (ie you are using VPN if the host is behind a
# firewall)
# usage: unisync [ucl] [j.carlin]
# get optional input
if ($#argv >= 1) then
set hostname="$1"
set hostname=ucl
if ($#argv == 2) then
set touser="$2"
set touser=$USER
set fromdir=/Users/$USER/unibox
set todir=/Users/$touser/unibox
# auto should mean that we get batch mode if there are no conflicts, and
# interactive mode otherwise
unison $fromdir "ssh://"$hostname"/"$todir -auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment