#!/bin/bash # sudo aptitude install streamripper # -OR- # http://streamripper.sourceforge.net/ # indiepop # dronezone # groovesalad # secretagent # doomed # illstreet # get somafm channel url if [ "x$1" = "x" ]; then station="indiepop" else station=$1 fi somafm="http://somafm.com/$station.pls" # create destination directory if it doesn't exist if [[ ! -e /data/ripcast/ ]]; then mkdir /data/ripcast; fi ( while true; do wget -erobots=off -qO- $somafm | \ grep -iE "^File[0-9]+=" | \ sed -e 's/File[0-9]\+=//' | \ while read url; do streamripper $url -d /data/ripcast/ -r -q -D "%S/%q - %A - %T" &>/dev/null done done )&