xrforge/manyfold/root/hook.d/experience_updated/1000-scan-dir.sh

10 lines
275 B
Bash
Raw Normal View History

2025-10-29 17:57:16 +01:00
#!/bin/sh
2025-11-11 19:11:09 +01:00
dir="$(dirname $1)"
cd "$dir"
2025-10-29 17:57:16 +01:00
echo "[v] scan (new) files of model"
id="$(basename "$dir" | sed 's/\#//g')"
# TODO: better ratelimiting
test -f /tmp/.scan && test $id = "$(cat /tmp/.scan)" && exit
/manyfold/cli/manyfold.sh scan_experience $id
echo $id > /tmp/.scan