34 lines
766 B
Bash
34 lines
766 B
Bash
#!/bin/bash
|
|
updateMimes() {
|
|
Update mime_actions action 1 <<<"action != 1"
|
|
for destination in ${!destinationskipmime[@]}
|
|
do
|
|
IFS='|'
|
|
for mime_type in ${destinationskipmime["$destination"]}
|
|
do
|
|
IFS="$oldIFS"
|
|
Update mime_type_actions action 0 >/dev/null < <(
|
|
cat <<-EOWhere
|
|
destination_id = ${destinationid["$destination"]}
|
|
mime_text LIKE ${mime_type//\*/%}
|
|
EOWhere
|
|
)
|
|
done
|
|
done
|
|
for destination in ${!destinationcopymime[@]}
|
|
do
|
|
IFS='|'
|
|
for mime_type in ${destinationcopymime["$destination"]}
|
|
do
|
|
IFS="$oldIFS"
|
|
Update mime_type_actions action 2 >/dev/null < <(
|
|
cat <<-EOWhere
|
|
destination_id = ${destinationid["$destination"]}
|
|
mime_text LIKE ${mime_type//\*/%}
|
|
EOWhere
|
|
)
|
|
done
|
|
done
|
|
IFS="$oldIFS"
|
|
}
|