nice generalization for raw synch
authorChris Koeritz <fred@gruntose.com>
Sun, 17 Dec 2017 14:54:42 +0000 (09:54 -0500)
committerChris Koeritz <fred@gruntose.com>
Sun, 17 Dec 2017 14:54:42 +0000 (09:54 -0500)
now takes a hostname.

scripts/customize/fred/scripts/archival/raw_surya_synch.sh [deleted file]
scripts/customize/fred/scripts/archival/raw_synch.sh [new file with mode: 0644]

diff --git a/scripts/customize/fred/scripts/archival/raw_surya_synch.sh b/scripts/customize/fred/scripts/archival/raw_surya_synch.sh
deleted file mode 100644 (file)
index 57b9472..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
-
-echo "Updating walrus and musix from surya: raw mode without syncthing!"
-echo
-
-for currdir in basement imaginations musix walrus; do
-  sep
-  echo "synching $currdir folder..."
-  rsync -avz surya:/z/$currdir/* /z/$currdir/
-done
-
-sep
-
diff --git a/scripts/customize/fred/scripts/archival/raw_synch.sh b/scripts/customize/fred/scripts/archival/raw_synch.sh
new file mode 100644 (file)
index 0000000..9a69b9c
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+synch_host="$1"; shift
+if [ -z "$synch_host" ]; then
+  echo This script requires a hostname where we expect to find archives.
+  exit 1
+fi
+
+echo "Updating our local archives from $synch_host: this is very raw mode, without syncthing!" | splitter
+echo
+
+for currdir in basement imaginations musix walrus; do
+  sep
+  echo "synching $currdir folder from $synch_host..."
+  rsync -avz "$synch_host":/z/$currdir/* /z/$currdir/
+done
+
+sep
+