From 81b7f8b247aeb2c04b771e1527657945f859df0f Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Wed, 19 Jun 2013 02:34:47 +0200 Subject: [PATCH] setup/destination: channels --- lib/setup/setupDestination | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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() {