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

9 lines
276 B
Bash
Executable file

#!/bin/sh
dir="$(dirname $1)"
cd "$dir"
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