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

9 lines
243 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
id="$(basename "$dir" | sed 's/\#//g')"
echo "[v] scan (new) files of model $id"
# ratelimit
flock -n /tmp/.scan_experience_$id /manyfold/cli/manyfold.sh scan_experience $id
rm /tmp/.scan_experience_$id