From 220e756866ac535820ebeefc26b3493155d33667 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Tue, 21 Jan 2025 01:52:23 +0100 Subject: [PATCH] Treat destination in the order they are declared --- atom | 2 +- lib/config/print | 2 +- lib/config/write | 2 +- lib/destinations/create | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atom b/atom index 5a5e8e2..671ca4e 100755 --- a/atom +++ b/atom @@ -331,7 +331,7 @@ fi openDatabase -for destination in "${!destinationpath[@]}" +for destination in "${destinations[@]}" do if (( ${destinationenabled["$destination"]} )) then diff --git a/lib/config/print b/lib/config/print index dea0d16..db25e0e 100644 --- a/lib/config/print +++ b/lib/config/print @@ -21,7 +21,7 @@ printConfig() { printed=1 done unset printed - for destination in ${!destinationpath[@]} + for destination in ${destinations[@]} do cat <<-EOF diff --git a/lib/config/write b/lib/config/write index 1b85c7b..7da7b3a 100644 --- a/lib/config/write +++ b/lib/config/write @@ -52,7 +52,7 @@ path $sourcepath EOCfg - for destination in "${!destinationpath[@]}" + for destination in "${destinations[@]}" do cat <<-EOCfg [$destination] diff --git a/lib/destinations/create b/lib/destinations/create index e30b835..5c9910b 100644 --- a/lib/destinations/create +++ b/lib/destinations/create @@ -1,6 +1,6 @@ #!/bin/bash createDestinations() { - for destination in ${!destinationpath[@]} + for destination in ${destinations[@]} do if ! [ -d "${destinationpath["$destination"]}" ] then