aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-09-22 22:10:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-09-22 22:10:46 -0300
commit7e59e1390be3674e30647a223d24fdc51e8d84a8 (patch)
treeb30820c9f6347682972482ed0f71dbfef49186bd
parentff845d1d6dd305e146adaa38f865a91c50677126 (diff)
downloadunisyncer-7e59e1390be3674e30647a223d24fdc51e8d84a8.tar.gz
unisyncer-7e59e1390be3674e30647a223d24fdc51e8d84a8.tar.bz2
Renaming script to sync-all
-rwxr-xr-x[l---------]sync-all52
l---------[-rwxr-xr-x]sync-code52
l---------sync-home2
l---------sync-irssi2
l---------sync-irssi-tor2
5 files changed, 55 insertions, 55 deletions
diff --git a/sync-all b/sync-all
index e737e41..1d1ccc9 120000..100755
--- a/sync-all
+++ b/sync-all
@@ -1 +1,51 @@
-sync-code \ No newline at end of file
+#!/bin/bash
+#
+# sync code or home folder across systems
+#
+
+BASENAME="`basename $0`"
+DEST="$1"
+UNISON="unison"
+
+# Use the following config if you need to sync with legacy systems
+UNISON="unison-2.32.52"
+
+function sync_code_run {
+ local config="$1"
+
+ if [ -z "$config" ]; then
+ return
+ fi
+
+ if [ -f "$HOME/.unison/$config.prf" ]; then
+ echo "Starting sync using $config..."
+ $UNISON $config
+ else
+ echo "Skipping absent profile $config."
+ return
+ fi
+}
+
+if [ ! -z "$DEST" ]; then
+ profiles=""
+
+ if [ "$BASENAME" == "sync-code" ] || [ "$BASENAME" == "sync-all" ]; then
+ profiles="$profiles $DEST-code"
+ fi
+
+ if [ "$BASENAME" == "sync-irssi" ] || [ "$BASENAME" == "sync-all" ]; then
+ profiles="$profiles $DEST-irssi"
+ fi
+
+ if [ "$BASENAME" == "sync-irssi-tor" ] || [ "$BASENAME" == "sync-all" ]; then
+ profiles="$profiles $DEST-irssi-tor"
+ fi
+
+ if [ "$BASENAME" == "sync-home" ] || [ "$BASENAME" == "sync-all" ]; then
+ profiles="$profiles $DEST-home"
+ fi
+
+ for profile in $profiles; do
+ sync_code_run $profile
+ done
+fi
diff --git a/sync-code b/sync-code
index 1d1ccc9..4ae0e16 100755..120000
--- a/sync-code
+++ b/sync-code
@@ -1,51 +1 @@
-#!/bin/bash
-#
-# sync code or home folder across systems
-#
-
-BASENAME="`basename $0`"
-DEST="$1"
-UNISON="unison"
-
-# Use the following config if you need to sync with legacy systems
-UNISON="unison-2.32.52"
-
-function sync_code_run {
- local config="$1"
-
- if [ -z "$config" ]; then
- return
- fi
-
- if [ -f "$HOME/.unison/$config.prf" ]; then
- echo "Starting sync using $config..."
- $UNISON $config
- else
- echo "Skipping absent profile $config."
- return
- fi
-}
-
-if [ ! -z "$DEST" ]; then
- profiles=""
-
- if [ "$BASENAME" == "sync-code" ] || [ "$BASENAME" == "sync-all" ]; then
- profiles="$profiles $DEST-code"
- fi
-
- if [ "$BASENAME" == "sync-irssi" ] || [ "$BASENAME" == "sync-all" ]; then
- profiles="$profiles $DEST-irssi"
- fi
-
- if [ "$BASENAME" == "sync-irssi-tor" ] || [ "$BASENAME" == "sync-all" ]; then
- profiles="$profiles $DEST-irssi-tor"
- fi
-
- if [ "$BASENAME" == "sync-home" ] || [ "$BASENAME" == "sync-all" ]; then
- profiles="$profiles $DEST-home"
- fi
-
- for profile in $profiles; do
- sync_code_run $profile
- done
-fi
+sync-all \ No newline at end of file
diff --git a/sync-home b/sync-home
index e737e41..4ae0e16 120000
--- a/sync-home
+++ b/sync-home
@@ -1 +1 @@
-sync-code \ No newline at end of file
+sync-all \ No newline at end of file
diff --git a/sync-irssi b/sync-irssi
index e737e41..4ae0e16 120000
--- a/sync-irssi
+++ b/sync-irssi
@@ -1 +1 @@
-sync-code \ No newline at end of file
+sync-all \ No newline at end of file
diff --git a/sync-irssi-tor b/sync-irssi-tor
index e737e41..4ae0e16 120000
--- a/sync-irssi-tor
+++ b/sync-irssi-tor
@@ -1 +1 @@
-sync-code \ No newline at end of file
+sync-all \ No newline at end of file