setup/destination: channels
This commit is contained in:
parent
374a59921b
commit
81b7f8b247
@ -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() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user