portability fixes for ssc script courtesy of Ulrich Spoerlein

This commit is contained in:
Ron Pedde 2007-10-23 03:13:15 +00:00
parent 1292992f6f
commit 14626a0174
1 changed files with 11 additions and 22 deletions

View File

@ -22,32 +22,21 @@ flac_file() {
}
FILE=$1
OFFSET=0
if [ "$2" == "" ]; then
OFFSET=0
else
OFFSET=$2
fi
OFFSET=${2:-0}
if [ "$3" != "" ]; then
FORGELEN="-l $3"
fi
if ( echo $1 | grep -i "\.ogg$" > /dev/null 2>&1 ); then
ogg_file
exit;
fi
if ( echo $1 | grep -i "\.flac$" > /dev/null 2>&1 ); then
flac_file
exit;
fi
#
case "$1" in
*.[oO][gG][gG])
ogg_file
;;
*.[fF][lL][aA][cC])
flac_file
;;
*)
# here you could cat a generic "error" wav...
#
#
# cat /path/to/error.wav
#
;;
esac