createDestinations() { for destination in ${!destinationpath[@]} do if ! [ -d "${destinationpath["$destination"]}" ] then if ! mkdir -p "${destinationpath["$destination"]}" then echo "$destination: Could not create ${destinationpath["$destination"]}!" exit $EINVDEST fi fi destinationid["$destination"]=$( InsertIfUnset destinations <<<"name $destination" ) done }