From 6655df54714d84fa51aef0fc4c8246d78776e7d7 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 10 Apr 2020 14:42:34 +0200 Subject: [PATCH 1/2] adding "say -v Luca" as default for OSX --- mannaggia.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mannaggia.sh b/mannaggia.sh index 7612a6c..1405fa5 100755 --- a/mannaggia.sh +++ b/mannaggia.sh @@ -14,7 +14,7 @@ # released under GNU-GPLv3 ############################################################ # parametri da command line: -# --audio : attiva mplayer per fargli pronunciare i santi +# --audio : attiva mplayer per fargli pronunciare i santi ("say" su OSX) # --spm : numero di santi per minuto # --wall : invia l'output a tutte le console : attenzione , se non siete root o sudoers disattivare il flag -n # --nds : numero di santi da invocare (di default continua all'infinito) @@ -32,17 +32,19 @@ shutdown=false off=false DELSTRING1="" DELSTRING2="" -DEFPLAYER="mplayer -cache 1024 -" -PLAYER="${PLAYER:-$DEFPLAYER}" -LC_CTYPE=C if [ $(uname) = "Darwin" ] then shufCmd=gshuf + DEFPLAYER="say -v Luca" else shufCmd=shuf + DEFPLAYER="mplayer -cache 1024 -" fi +PLAYER="${PLAYER:-$DEFPLAYER}" +LC_CTYPE=C + # lettura parametri da riga comando for parm in "$@" do @@ -141,7 +143,12 @@ while [ "$nds" != 0 ] if [ "$audioflag" = true ] then - wget "$MANNAGGIAURL" -O - 2> /dev/null | $PLAYER >> /dev/null 2>&1 + if [ $(uname) = "Darwin" ] + then + $PLAYER "$MANNAGGIA" + else + wget "$MANNAGGIAURL" -O - 2> /dev/null | $PLAYER >> /dev/null 2>&1 + fi fi sleep "$spm" From e70bfcf0eeca4d0bfaf179484227bacc9b7ec681 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 10 Apr 2020 14:50:28 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6de3d86..4a7f9ec 100644 --- a/README.md +++ b/README.md @@ -40,5 +40,6 @@ patcher e contributors: * Matteo Panella * Mattia Munari * Paolo Fabbri +* Paolo Compieta thanks to : Veteran Unix Admins group on Facebook