correction de bug de la fonction say: tout texte commencant par - etait interprete comme une option

This commit is contained in:
jhechavarria
2018-08-23 06:09:18 +02:00
parent a8cb43da37
commit 4c34f68bf7

6
say.sh
View File

@@ -176,7 +176,7 @@ say ()
echo "Give me something to say!" echo "Give me something to say!"
return return
fi fi
pico2wave -l ${cfg[0]} -w $SNDPATH "${text[*]}"; pico2wave -l ${cfg[0]} -w $SNDPATH "\"${text[*]}\"";
play $SNDPATH vol ${cfg[1]} speed ${cfg[2]}; play $SNDPATH vol ${cfg[1]} speed ${cfg[2]};
} }
@@ -245,8 +245,6 @@ elif [ "$1" = "say" ]; then
if [ "`pgrep -x play`" > /dev/null ]; then if [ "`pgrep -x play`" > /dev/null ]; then
shutup; shutup;
else else
TEXT=`xsel`; say "`xsel`" ;
echo "$TEXT";
echo "$TEXT" | say;
fi fi
fi fi