Package: alsa-tools
Version: 1.0.24.1-2
Severity: normal
Tags: patch

While compiling this version for Debian "stable" I have found one more
bashism which make problems while create packages: I got the lintian
warning:

E: ld10k1: shell-script-fails-syntax-check ./usr/share/ld10k1/init_live

And here is the solution for file ld10k1/setup/init_live.in:

 dump_patches
 {
-    num=$1
+    max=$(( ${1} - 1 ))
+    line=$(seq -s ' ' 0 $max)
 
-    for (( i=0; $i < $num; i=$i+1 )); do
-       p=$(( $i + 100))
-       runlo10k1 --debug $p
+    for i in ${line}; do
+      p=$(( $i + 100))
+      runlo10k1 --debug $p
     done
 
     exit
 }

See the attachment for the updated patch file.


-- System Information:
Debian Release: squeeze
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

---
Have a nice day.

Joachim (Germany)
Description: Fixim bashism found by checkbashisms script
Author: Elimar Riesebieter <riese...@lxtec.de>, Joachim Wiedorn <ad_deb...@joonet.de>
Last-Update: 2010-10-05

diff -urN s04/ld10k1/setup/init_live.in s05/ld10k1/setup/init_live.in
--- s04/ld10k1/setup/init_live.in	2011-01-28 16:13:36.000000000 +0100
+++ s05/ld10k1/setup/init_live.in	2011-10-05 15:08:05.207933133 +0200
@@ -46,7 +46,7 @@
 std_capture=capture
 #std_capture=capture_noswitch
 
-function log
+log
 {
     local level=$1
 
@@ -57,7 +57,7 @@
     fi
 }
 
-function runlo10k1
+runlo10k1
 {
     log 2 $LO10K1 "$@"
 
@@ -71,7 +71,7 @@
     fi
 }
 
-function rename
+rename
 {
     port=$1
     name=$2
@@ -81,7 +81,7 @@
     runlo10k1 --renam "$port=$name"
 }
 
-function connect
+connect
 {
     from=$1
     op=$2
@@ -92,7 +92,7 @@
     runlo10k1 --conadd "$from$op$to"
 }
 
-function copy
+copy
 {
     local name=$1
     local port=$2
@@ -105,7 +105,7 @@
     connect "PIN($name Copy)" '=' "$port"
 }
 
-function volume
+volume
 {
     local name=$1
     local port=$2
@@ -120,7 +120,7 @@
     connect "PIN($name Volume)" '=' "$port"
 }
 
-function master_volume
+master_volume
 {
     local name=$1
     local port=$2
@@ -135,7 +135,7 @@
     connect "$port" '=' "PIN($name Volume)"
 }
 
-function switch
+switch
 {
     local name=$1
     local port=$2
@@ -150,7 +150,7 @@
     connect "PIN($name Switch)" '>' "$port"
 }
 
-function switch_2x2
+switch_2x2
 {
     local name=$1
     local port1=$2
@@ -166,7 +166,7 @@
     connect "PIN($name Switch,2,3)" '>' "$port2"
 }
 
-function switch_5x2
+switch_5x2
 {
     local name=$1
     local port1=$2
@@ -182,7 +182,7 @@
     connect "PIN($name Switch,5,6,7,8,9)" '>' "$port2"
 }
 
-function master_switch
+master_switch
 {
     local name=$1
     local port=$2
@@ -197,7 +197,7 @@
     connect "PIN($name Switch)" '=' "$port"
 }
 
-function playback
+playback
 {
     name=$1
     port=$2
@@ -211,7 +211,7 @@
     add_output "POUT($name Playback Volume)"
 }
 
-function playback_noswitch
+playback_noswitch
 {
     name=$1
     port=$2
@@ -224,7 +224,7 @@
     add_output "POUT($name Playback Volume)"
 }
 
-function capture
+capture
 {
     name=$1
     port=$2
@@ -238,7 +238,7 @@
     connect "POUT($name Capture Volume)" '>' "OUT(OUT_PCM_Capture_Left,OUT_PCM_Capture_Right)"
 }
 
-function capture_noswitch
+capture_noswitch
 {
     name=$1
     port=$2
@@ -251,7 +251,7 @@
     connect "POUT($name Capture Volume)" '>' "OUT(OUT_PCM_Capture_Left,OUT_PCM_Capture_Right)"
 }
 
-function master
+master
 {
     local name=$1
     local port=$2
@@ -264,48 +264,48 @@
     master_switch "$name Playback" "POUT($name Playback Volume)" 1 $index
 }
 
-function dump_patches
+dump_patches
 {
-    num=$1
+    max=$(( ${1} - 1 ))
+    line=$(seq -s ' ' 0 $max)
 
-    for (( i=0; $i < $num; i=$i+1 )); do
-	p=$(( $i + 100))
-	runlo10k1 --debug $p
+    for i in ${line}; do
+      p=$(( $i + 100))
+      runlo10k1 --debug $p
     done
 
-
     exit
 }
 
-function add_output
+add_output
 {
     local port=$1
 
     $add_output_func "$port"
 }
 
-function add_output_tone_2
+add_output_tone_2
 {
     local port=$1
 
     connect "$port" '>' "PIN(Tone Control,0,1)"
 }
 
-function add_output_simple_2
+add_output_simple_2
 {
     local port=$1
 
     connect "$port" '>' "PIN(Wave Simple Stereo To 51,0,1)"
 }
 
-function add_output_prologic_2
+add_output_prologic_2
 {
     local port=$1
 
     connect "$port" '>' "PIN(Wave Prologic,0,1)"
 }
 
-function add_output_switched_2
+add_output_switched_2
 {
     local port=$1
 
@@ -314,7 +314,7 @@
 }
 
 
-function simple_stereo_to_51
+simple_stereo_to_51
 {
     local name=$1
     local control=$2
@@ -330,7 +330,7 @@
     fi
 }
 
-function prologic
+prologic
 {
     local name=$1
     local control=$2
@@ -351,7 +351,7 @@
     connect "POUT($name Prologic)" '=' "PIN($name Multi Volume,0,1,2,3,4,5)"
 }
 
-function tone
+tone
 {
     local name=$1
     local port=$2
@@ -364,7 +364,7 @@
     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
 }
 
-function multi_playback
+multi_playback
 {
     local name=$1
     local port=$2
@@ -383,7 +383,7 @@
     connect "POUT($name Multi Volume)" '>' "PIN(Tone Control)"
 }
 
-function fxbus
+fxbus
 {
     local name=$1
     local enable_pcm_fx89=$2

Reply via email to