aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Riehs <tristan.riehs@inria.fr>2025-11-30 11:11:32 +0100
committerTristan Riehs <tristan.riehs@inria.fr>2025-11-30 11:11:32 +0100
commit14addaafbf49baf23ddbed3e92a2ef4ef7f7a4f8 (patch)
tree749a2eb1f81de39105bb9a0dd6c401b265e372b3
parent4e66d837a0eb7f4538305fd4579da9293f581b81 (diff)
Add script for adding a whole directory to database
-rwxr-xr-xshell/ftag-add-dir-rec.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/shell/ftag-add-dir-rec.sh b/shell/ftag-add-dir-rec.sh
new file mode 100755
index 0000000..f8c489d
--- /dev/null
+++ b/shell/ftag-add-dir-rec.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ $# -eq 0 ]
+then
+ echo "Usage: $0 DIR..."
+fi
+
+tmp_file="$(mktemp)"
+for dir in "$@"
+do
+ find "$dir" -type f -fprint "$tmp_file"
+done
+
+cat "$tmp_file" | uniq -u | xargs -d '\\n' ftag file add