bin: update file serving

This commit is contained in:
xeruf 2021-10-12 09:17:45 +02:00
parent c39ee5d7b8
commit 3c68dc3657
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,4 @@
#!/bin/sh -e #!/bin/sh -e
# Move roam files into subfolders # Move roam files into subfolders
cd $DATA/2-standards/notes/roam cd $DATA/2-standards/notes/roam
grep -l --directories=skip "roam_tags: person" * | xargs --no-run-if-empty mv -t people 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
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

6
.local/bin/scripts/scpr Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# Copy recursively over ssh
server="$1"
folder="$2"
ssh "$server" "mkdir -p '$folder'"
scp -rC "${@:2}" "$server:$folder"