generalized the syncthing conflict locator
authorFred T. Hamster <fred@gruntose.com>
Wed, 16 Apr 2025 14:41:37 +0000 (10:41 -0400)
committerFred T. Hamster <fred@gruntose.com>
Wed, 16 Apr 2025 14:41:37 +0000 (10:41 -0400)
scripts/customize/fred/scripts/automation/locate_syncthing_conflicts.sh

index ecd24b4550652175df01163dfe75eb5a5b81da54..28f8e309c2af6c6cb358f02807e1d1b2979a86a2 100644 (file)
@@ -1,4 +1,10 @@
+#!/usr/bin/env bash
 
-# assumes our file hierarchy on /z, which is where most of our
-# synching is done against.
-find /z/ -follow -iname ".sync-conflict*"
+path="$1"; shift
+if [ -z "$path" ]; then
+  # assumes our file hierarchy on /z, which is where most of our
+  # synching is done against.
+  path="/z/"
+fi
+
+find "$path" -follow -iname ".sync-conflict*"