~ubuntu-branches/ubuntu/trusty/alsa-tools/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/init_live_bashismfix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2010-06-21 13:37:56 UTC
  • mfrom: (2.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100621133756-pchht2gfhd1qtwfo
Tags: 1.0.23-2ubuntu1
* Merge from debian unstable.  Remaining changes:
  - envy24control should use /sbin/alsactl
  - Vcs-Bzr uri
  - Use dh_installudev to install udev rules file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fixim bashism found by checkbashisms script
 
2
Author: Elimar Riesebieter <riesebie@lxtec.de>
 
3
Last-Update: 2010-05-11.
 
4
 
 
5
Index: alsa-tools-1.0.22/ld10k1/setup/init_live.in
 
6
===================================================================
 
7
--- alsa-tools-1.0.22.orig/ld10k1/setup/init_live.in    2010-05-11 23:09:38.000000000 +0200
 
8
+++ alsa-tools-1.0.22/ld10k1/setup/init_live.in 2010-05-11 23:09:42.000000000 +0200
 
9
@@ -46,7 +46,7 @@
 
10
 std_capture=capture
 
11
 #std_capture=capture_noswitch
 
12
 
 
13
-function log
 
14
+log
 
15
 {
 
16
     local level=$1
 
17
 
 
18
@@ -57,7 +57,7 @@
 
19
     fi
 
20
 }
 
21
 
 
22
-function runlo10k1
 
23
+runlo10k1
 
24
 {
 
25
     log 2 $LO10K1 "$@"
 
26
 
 
27
@@ -71,7 +71,7 @@
 
28
     fi
 
29
 }
 
30
 
 
31
-function rename
 
32
+rename
 
33
 {
 
34
     port=$1
 
35
     name=$2
 
36
@@ -81,7 +81,7 @@
 
37
     runlo10k1 --renam "$port=$name"
 
38
 }
 
39
 
 
40
-function connect
 
41
+connect
 
42
 {
 
43
     from=$1
 
44
     op=$2
 
45
@@ -92,7 +92,7 @@
 
46
     runlo10k1 --conadd "$from$op$to"
 
47
 }
 
48
 
 
49
-function copy
 
50
+copy
 
51
 {
 
52
     local name=$1
 
53
     local port=$2
 
54
@@ -105,7 +105,7 @@
 
55
     connect "PIN($name Copy)" '=' "$port"
 
56
 }
 
57
 
 
58
-function volume
 
59
+volume
 
60
 {
 
61
     local name=$1
 
62
     local port=$2
 
63
@@ -120,7 +120,7 @@
 
64
     connect "PIN($name Volume)" '=' "$port"
 
65
 }
 
66
 
 
67
-function master_volume
 
68
+master_volume
 
69
 {
 
70
     local name=$1
 
71
     local port=$2
 
72
@@ -135,7 +135,7 @@
 
73
     connect "$port" '=' "PIN($name Volume)"
 
74
 }
 
75
 
 
76
-function switch
 
77
+switch
 
78
 {
 
79
     local name=$1
 
80
     local port=$2
 
81
@@ -150,7 +150,7 @@
 
82
     connect "PIN($name Switch)" '>' "$port"
 
83
 }
 
84
 
 
85
-function switch_2x2
 
86
+switch_2x2
 
87
 {
 
88
     local name=$1
 
89
     local port1=$2
 
90
@@ -166,7 +166,7 @@
 
91
     connect "PIN($name Switch,2,3)" '>' "$port2"
 
92
 }
 
93
 
 
94
-function switch_5x2
 
95
+switch_5x2
 
96
 {
 
97
     local name=$1
 
98
     local port1=$2
 
99
@@ -182,7 +182,7 @@
 
100
     connect "PIN($name Switch,5,6,7,8,9)" '>' "$port2"
 
101
 }
 
102
 
 
103
-function master_switch
 
104
+master_switch
 
105
 {
 
106
     local name=$1
 
107
     local port=$2
 
108
@@ -197,7 +197,7 @@
 
109
     connect "PIN($name Switch)" '=' "$port"
 
110
 }
 
111
 
 
112
-function playback
 
113
+playback
 
114
 {
 
115
     name=$1
 
116
     port=$2
 
117
@@ -211,7 +211,7 @@
 
118
     add_output "POUT($name Playback Volume)"
 
119
 }
 
120
 
 
121
-function playback_noswitch
 
122
+playback_noswitch
 
123
 {
 
124
     name=$1
 
125
     port=$2
 
126
@@ -224,7 +224,7 @@
 
127
     add_output "POUT($name Playback Volume)"
 
128
 }
 
129
 
 
130
-function capture
 
131
+capture
 
132
 {
 
133
     name=$1
 
134
     port=$2
 
135
@@ -238,7 +238,7 @@
 
136
     connect "POUT($name Capture Volume)" '>' "OUT(OUT_PCM_Capture_Left,OUT_PCM_Capture_Right)"
 
137
 }
 
138
 
 
139
-function capture_noswitch
 
140
+capture_noswitch
 
141
 {
 
142
     name=$1
 
143
     port=$2
 
144
@@ -251,7 +251,7 @@
 
145
     connect "POUT($name Capture Volume)" '>' "OUT(OUT_PCM_Capture_Left,OUT_PCM_Capture_Right)"
 
146
 }
 
147
 
 
148
-function master
 
149
+master
 
150
 {
 
151
     local name=$1
 
152
     local port=$2
 
153
@@ -264,11 +264,11 @@
 
154
     master_switch "$name Playback" "POUT($name Playback Volume)" 1 $index
 
155
 }
 
156
 
 
157
-function dump_patches
 
158
+dump_patches
 
159
 {
 
160
     num=$1
 
161
 
 
162
-    for (( i=0; $i < $num; i=$i+1 )); do
 
163
+    for $(( i=0; $i < $num; i=$i+1 )); do
 
164
        p=$(( $i + 100))
 
165
        runlo10k1 --debug $p
 
166
     done
 
167
@@ -277,35 +277,35 @@
 
168
     exit
 
169
 }
 
170
 
 
171
-function add_output
 
172
+add_output
 
173
 {
 
174
     local port=$1
 
175
 
 
176
     $add_output_func "$port"
 
177
 }
 
178
 
 
179
-function add_output_tone_2
 
180
+add_output_tone_2
 
181
 {
 
182
     local port=$1
 
183
 
 
184
     connect "$port" '>' "PIN(Tone Control,0,1)"
 
185
 }
 
186
 
 
187
-function add_output_simple_2
 
188
+add_output_simple_2
 
189
 {
 
190
     local port=$1
 
191
 
 
192
     connect "$port" '>' "PIN(Wave Simple Stereo To 51,0,1)"
 
193
 }
 
194
 
 
195
-function add_output_prologic_2
 
196
+add_output_prologic_2
 
197
 {
 
198
     local port=$1
 
199
 
 
200
     connect "$port" '>' "PIN(Wave Prologic,0,1)"
 
201
 }
 
202
 
 
203
-function add_output_switched_2
 
204
+add_output_switched_2
 
205
 {
 
206
     local port=$1
 
207
 
 
208
@@ -314,7 +314,7 @@
 
209
 }
 
210
 
 
211
 
 
212
-function simple_stereo_to_51
 
213
+simple_stereo_to_51
 
214
 {
 
215
     local name=$1
 
216
     local control=$2
 
217
@@ -330,7 +330,7 @@
 
218
     fi
 
219
 }
 
220
 
 
221
-function prologic
 
222
+prologic
 
223
 {
 
224
     local name=$1
 
225
     local control=$2
 
226
@@ -351,7 +351,7 @@
 
227
     connect "POUT($name Prologic)" '=' "PIN($name Multi Volume,0,1,2,3,4,5)"
 
228
 }
 
229
 
 
230
-function tone
 
231
+tone
 
232
 {
 
233
     local name=$1
 
234
     local port=$2
 
235
@@ -364,7 +364,7 @@
 
236
     runlo10k1 -n --ctrl "c-bass0,bass1,bass2,bass3,bass4:$name - Bass,t-$name - Bass:2,v-$name - Bass:1,c-treble0,treble1,treble2,treble3,treble4:$name - Treble,t-$name - Treble:3,v-$name - Treble:1,c-toneonoff:$name - Switch,t-$name - Switch:4" --patch_name "${name}" -a tone.emu10k1
 
237
 }
 
238
 
 
239
-function multi_playback
 
240
+multi_playback
 
241
 {
 
242
     local name=$1
 
243
     local port=$2
 
244
@@ -383,7 +383,7 @@
 
245
     connect "POUT($name Multi Volume)" '>' "PIN(Tone Control)"
 
246
 }
 
247
 
 
248
-function fxbus
 
249
+fxbus
 
250
 {
 
251
     local name=$1
 
252
     local enable_pcm_fx89=$2