use an actual mount

This commit is contained in:
2026-06-21 09:55:33 -07:00
parent cdde5e3d6a
commit 83779b6906

View File

@@ -21,7 +21,7 @@ fi
echo "[comfyui-sync] Starting at $(date)"
current_files=$(ls "$SOURCE" | sort)
current_files=$(find "$SOURCE" -maxdepth 1 -type f -printf '%f\n' | sort)
if [ -f "$STATE_FILE" ]; then
new_files=$(comm -13 <(sort "$STATE_FILE") <(echo "$current_files"))
@@ -32,19 +32,18 @@ fi
new_count=$(echo "$new_files" | grep -c '[^[:space:]]' || true)
if [ "$new_count" -eq 0 ]; then
echo "[comfyui-sync] No new files to copy."
exit 0
fi
echo "[comfyui-sync] Copying $new_count new file(s)..."
while IFS= read -r f; do
if [ "$new_count" -gt 0 ]; then
echo "[comfyui-sync] Copying $new_count new file(s)..."
while IFS= read -r f; do
[ -z "$f" ] && continue
cp "$SOURCE/$f" "$SHARE_DIR/"
done <<< "$new_files"
done <<< "$new_files"
echo "$current_files" > "$STATE_FILE"
echo "[comfyui-sync] State file updated."
echo "$current_files" > "$STATE_FILE"
echo "[comfyui-sync] State file updated."
else
echo "[comfyui-sync] No new files to copy."
fi
if [ -n "$NEATCLI" ]; then
echo "[comfyui-sync] Running neatcli organize --by-type -e $SHARE_DIR"