summary refs log tree commit diff
path: root/bin/sync-shell-files
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sync-shell-files')
-rwxr-xr-xbin/sync-shell-files15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/sync-shell-files b/bin/sync-shell-files
new file mode 100755
index 0000000..dca1262
--- /dev/null
+++ b/bin/sync-shell-files
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+to_host="$1"
+
+if [[ -z "${to_host}" ]]; then
+  echo "usage: $0 <host>"
+  exit 1
+fi
+
+files="inputrc gitconfig"
+for file in $files; do
+  rsync -avz --delete "${HOME}/src/dotfiles/${file}" "${to_host}:.${file}"
+done
+
+[ -f "${HOME}/.gitconfig.private" ] && rsync -avz --delete "${HOME}/.gitconfig.private" "${to_host}:"