got menu.sh working again by using bash shell, guess this handles arrays OK
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 16 Aug 2010 08:38:43 +0000 (08:38 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 16 Aug 2010 08:38:43 +0000 (08:38 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@172 01035d8c-6547-0410-b346-abe4f91aad63

codec2/script/menu.sh

index e9ab7f0280a6883b452cc2220d9a27d4f6a854e2..c1a620bd9c5aa528e97cc2a9bf5540fe49395d9c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # ./menu.sh
 #
 # David Rowe
@@ -61,11 +61,11 @@ do
   readchar=`dd if=/dev/tty bs=1 count=1 2>/dev/null`
   echo $readchar
   stty -cbreak
-#  if [ $readchar == 'q' ] ; then
-#    readchar=0
-#  fi
+  if [ $readchar == 'q' ] ; then
+    readchar=0
+  fi
   if [ $readchar -ne 0 ] ; then
-    echo "play -r 8000 -s -2 ${file[$readchar]} $dsp > /dev/null"
+    play -r 8000 -s -2 ${file[$readchar]} $dsp 2> /dev/null
   fi
 done
 echo