From 14addaafbf49baf23ddbed3e92a2ef4ef7f7a4f8 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 30 Nov 2025 11:11:32 +0100 Subject: Add script for adding a whole directory to database --- shell/ftag-add-dir-rec.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 shell/ftag-add-dir-rec.sh (limited to 'shell') 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 -- cgit v1.2.3