aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-09-14 14:17:56 -0400
committerMitch Riedstra <mitch@riedstra.us>2019-09-14 14:17:56 -0400
commitc61145f082e988d08828af979ac5d37ea340076f (patch)
tree11e3d9c5282d0ad7d58cde31efe3e561d87ebae3
parent2247987cc4e0d44dd820b308d4479cc57084343e (diff)
downloaddotfiles-c61145f082e988d08828af979ac5d37ea340076f.tar.gz
dotfiles-c61145f082e988d08828af979ac5d37ea340076f.tar.xz
Add a small send script
-rw-r--r--send.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/send.sh b/send.sh
new file mode 100644
index 0000000..7db7c7a
--- /dev/null
+++ b/send.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+# set -x
+
+# Simple shell script to package and send over my dotfiles to a remote machine
+
+package="$(mktemp -d)"
+
+for _f in bashrc mkshrc tmux.conf tmux_helper.sh ; do
+ cp "$_f" "$package/.$_f"
+done
+
+touch "$package/.tmux.conf.local"
+
+echo "Sending: "
+ls -AF "$package" | sed -e's/^/ /'
+
+for host in "$@" ; do
+ echo "Operating on host: $host"
+ tar -C "$package" -czf - . | ssh "$host" "tar -xzf -"
+done
+
+rm -rf "$package"