]> gitweb.fluxo.info Git - scripts.git/commitdiff
Adding sync-home
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 31 Jan 2013 23:34:40 +0000 (21:34 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 31 Jan 2013 23:34:40 +0000 (21:34 -0200)
sync-home [new file with mode: 0755]

diff --git a/sync-home b/sync-home
new file mode 100755 (executable)
index 0000000..4c9d6db
--- /dev/null
+++ b/sync-home
@@ -0,0 +1,16 @@
+#!/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