#!/bin/bash # # sync code or home folder across systems # BASENAME="`basename $0`" DEST="$1" UNISON="unison-2.32.52" if [ ! -z "$DEST" ]; then if [ "$BASENAME" == "sync-code" ]; then profile="$DEST-code" else profile="$DEST-home" fi if [ -f "$HOME/.unison/$profile.prf" ]; then $UNISON $profile else echo "No such profile $HOME/.unison/$profile.prf" exit 1 fi fi