35 lines
700 B
Bash
35 lines
700 B
Bash
|
# techsnap downloader
|
||
|
|
||
|
HDvideo="http://www.podtrac.com/pts/redirect.mp4/201402.jb-dl.cdn.scaleengine.net/techsnap/2014/techsnap-0148.mp4"
|
||
|
MP3audio="http://www.podtrac.com/pts/redirect.mp3/traffic.libsyn.com/jnite/techsnap-0148-mp3.mp3"
|
||
|
OGGaudio="http://www.podtrac.com/pts/redirect.ogg/traffic.libsyn.com/jnite/techsnap-0148-ogg.ogg"
|
||
|
|
||
|
destDIR="/home/$USER/syncs/techsnap/"
|
||
|
|
||
|
function chkDIR(){
|
||
|
if [ ! -d ${destDIR} ];then
|
||
|
mkdir ${destDIR}
|
||
|
elif [ -d ${destDIR} ];then
|
||
|
main
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
|
||
|
function main(){
|
||
|
|
||
|
rm -v ${destDIR}*.mp3
|
||
|
rm -v ${destDIR}*.ogg
|
||
|
rm -v ${destDIR}*.mp4
|
||
|
|
||
|
wget ${HDvideo} -P ${destDIR}
|
||
|
|
||
|
wget ${MP3audio} -P ${destDIR}
|
||
|
|
||
|
wget ${OGGaudio} -P ${destDIR}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
chkDIR
|