diff --git a/lib/setup/setupDestination b/lib/setup/setupDestination index ab624c8..0697a77 100644 --- a/lib/setup/setupDestination +++ b/lib/setup/setupDestination @@ -334,11 +334,25 @@ setupDestination() { done unset copiedmimes cat <<-EODesc + + Channels (integer): + Produced files should have this many channels, no more, no less. EODesc + expr='^[0-9]*$' 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 + destinationchannels["$destination"]=$value cat <<-EODesc EODesc comeagain() {