--- /dev/null
+#!/bin/bash
+#
+# sync code or home folder across systems
+#
+
+BASENAME="`basename $0`"
+DEST="$1"
+
+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
+++ /dev/null
-#!/bin/bash
-#
-# sync home folder across systems
-#
-
-DEST="$1"
-
-if [ ! -z "$DEST" ]; then
- profile="$DEST-home"
- if [ -f "$HOME/.unison/$profile.prf" ]; then
- unison $profile
- else
- echo "No such profile $HOME/.unison/$profile.prf"
- exit 1
- fi
-fi