Skip to content

Instantly share code, notes, and snippets.

@jooh jooh/unisync
Created Jan 5, 2016

Embed
What would you like to do?
#!/bin/tcsh
#
# 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"
else
set hostname=ucl
endif
if ($#argv == 2) then
set touser="$2"
else
set touser=$USER
endif
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
You can’t perform that action at this time.