diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-31 23:05:42 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-31 23:05:42 +0300 |
| commit | 415e12a61f0270ae7048b2e79ad04cb02ea58baa (patch) | |
| tree | c0dea6267603ca58255f57dcafd5f5206340df8c /scripts/immich-export | |
| parent | fb00c25dbef792f1110adf824f9cc3edb8739ef8 (diff) | |
immich-export: fix associative array to prevent silent key drops
declare -A with inline \$() substitutions can silently drop entries in some
bash versions; assign keys after declaration to ensure both accounts load.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'scripts/immich-export')
| -rwxr-xr-x | scripts/immich-export | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/immich-export b/scripts/immich-export index 0d6d1c2..8952e0e 100755 --- a/scripts/immich-export +++ b/scripts/immich-export @@ -15,10 +15,11 @@ DATE_AFTER="2026-01-01T00:00:00.000Z" DATE_BEFORE="2026-03-31T23:59:59.000Z" PAGE_SIZE=100 -declare -A ACCOUNTS=( - ["paul"]="$(cat ~/.immich_paul_key)" - ["albena"]="$(cat ~/.immich_albena_key)" -) +# Load keys explicitly — declare -A with inline $() substitutions can silently +# drop entries in some bash versions, so we assign after the declaration. +declare -A ACCOUNTS +ACCOUNTS["paul"]="$(cat ~/.immich_paul_key)" +ACCOUNTS["albena"]="$(cat ~/.immich_albena_key)" mkdir -p "$DEST_DIR" |
