Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ patcher e contributors:
* Matteo Panella
* Mattia Munari
* Paolo Fabbri
* Paolo Compieta

thanks to : Veteran Unix Admins group on Facebook
17 changes: 12 additions & 5 deletions mannaggia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <n> : 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 <n> : numero di santi da invocare (di default continua all'infinito)
Expand All @@ -32,17 +32,19 @@ shutdown=false
off=false
DELSTRING1="</FONT>"
DELSTRING2="</b>"
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
Expand Down Expand Up @@ -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"
Expand Down