Last active
January 14, 2016 16:00
-
-
Save cristianobecker/8921dacf616f1bcf022a to your computer and use it in GitHub Desktop.
Internet radio to work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
radio() { | |
local radio | |
local station | |
local playlist | |
if test $# -eq 2; then | |
radio="$1" | |
station="$2" | |
elif test $# -eq 0; then | |
radio=soma | |
station=groovesalad | |
else | |
echo "Usage: radio [radio station]" | |
fi | |
case $radio in | |
soma) playlist="http://somafm.com/$station.pls" ;; | |
difm) playlist="http://listen.di.fm/public3/$station.pls" ;; | |
*) echo "radio not available" | |
esac | |
test $playlist && mplayer -vo none -playlist "$playlist" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment