setup/destination: channels

This commit is contained in:
Vincent Riquer 2013-06-19 02:34:47 +02:00
parent 374a59921b
commit 81b7f8b247

View File

@ -334,11 +334,25 @@ setupDestination() {
done done
unset copiedmimes unset copiedmimes
cat <<-EODesc cat <<-EODesc
Channels (integer):
Produced files should have this many channels, no more, no less.
EODesc EODesc
expr='^[0-9]*$'
comeagain() { comeagain() {
: read \
-e \
${destinationchannels["$destination"]+-i${destinationchannels["$destination"]}}\
-p'Channel count: ' \
value
if ! [[ $value =~ $expr ]]
then
echo "Invalid channel count: $value" >&2
comeagain
fi
} }
comeagain comeagain
destinationchannels["$destination"]=$value
cat <<-EODesc cat <<-EODesc
EODesc EODesc
comeagain() { comeagain() {