Commit 3a322415e11d4c174f01ba5cb5c0d9fd4607a541

Thomas de Grivel 2024-06-30T10:29:07

restore_home

diff --git a/bin/restore_home b/bin/restore_home
new file mode 100755
index 0000000..7e52ecb
--- /dev/null
+++ b/bin/restore_home
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ "x$1" = "x-v" ]; then
+    V=P
+    shift
+fi
+
+HOST=s.kmx.io
+
+PATHS="$@"
+if [ "x$PATHS" = "x" ]; then
+    PATHS="Documents Pictures c/thodg common-lisp/thodg config"
+    PATHS="$PATHS erlang/thodg kmx.io mathematics patrice ports"
+    PATHS="$PATHS ruby/thodg txt/thodg"
+fi
+
+run () {
+    echo "$@"
+    "$@"
+}
+
+cd
+
+for P in $PATHS; do
+    run rsync -a$V --delete-before "$HOST":"$P" "$(dirname "$P")/"
+done