use an actual mount
This commit is contained in:
11
comfyui-sync
11
comfyui-sync
@@ -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,11 +32,7 @@ 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
|
||||
|
||||
if [ "$new_count" -gt 0 ]; then
|
||||
echo "[comfyui-sync] Copying $new_count new file(s)..."
|
||||
while IFS= read -r f; do
|
||||
[ -z "$f" ] && continue
|
||||
@@ -45,6 +41,9 @@ done <<< "$new_files"
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user