Created
February 6, 2016 08:47
-
-
Save limtbk/3d5dc751b7a12736f5ed to your computer and use it in GitHub Desktop.
Record Radio-t podcast
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
#!/bin/bash | |
NOW=$(date +"%Y-%m-%d") | |
NUMBER=`cat radio-t_number` | |
RADIOTDIR=~/RadioT/${NUMBER}_${NOW} | |
mkdir -p $RADIOTDIR | |
cd $RADIOTDIR | |
while [ ! -f stream.m3u ]; do | |
wget http://stream.radio-t.com:8181/stream.m3u | |
sleep 5m | |
done | |
mv stream.m3u rt_podcast${NUMBER}.mp3 | |
NUMBER=$((NUMBER+1)) | |
echo $NUMBER>radio-t_number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment