#!/bin/bash
createDestinations() {
	for destination in ${destinations[@]}
	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 ${destinationenabled[\"$destination\"]}"
		)
	done
}
