18 lines
450 B
Bash
18 lines
450 B
Bash
#!/bin/bash
|
|
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 ${destinationenabled[\"$destination\"]}"
|
|
)
|
|
done
|
|
}
|