diff --git a/.local/bin/scripts/roam b/.local/bin/scripts/roam index dd18c27..6798ca3 100755 --- a/.local/bin/scripts/roam +++ b/.local/bin/scripts/roam @@ -1,7 +1,4 @@ #!/bin/sh -e # Move roam files into subfolders cd $DATA/2-standards/notes/roam -grep -l --directories=skip "roam_tags: person" * | xargs --no-run-if-empty mv -t people -grep -l --directories=skip "roam_tags: tech" * | xargs --verbose --no-run-if-empty mv -t tech -grep -l --directories=skip "roam_tags: project" * | xargs --verbose --no-run-if-empty mv -t projects -grep -l --directories=skip "roam_tags: health" * | xargs --verbose --no-run-if-empty mv -t health +find . -mindepth 1 -type d -printf '%f\n' | while read dir; do grep -l --directories=skip "roam_tags: $dir" * | xargs --verbose --no-run-if-empty mv -t "$dir"; done diff --git a/.local/bin/scripts/scpr b/.local/bin/scripts/scpr new file mode 100755 index 0000000..e8e6272 --- /dev/null +++ b/.local/bin/scripts/scpr @@ -0,0 +1,6 @@ +#!/bin/sh +# Copy recursively over ssh +server="$1" +folder="$2" +ssh "$server" "mkdir -p '$folder'" +scp -rC "${@:2}" "$server:$folder"