Parse for no input
This commit is contained in:
parent
30fd3bf51c
commit
df0b91f7a3
@ -3,10 +3,21 @@
|
|||||||
|
|
||||||
target_url=$1
|
target_url=$1
|
||||||
|
|
||||||
|
function grab_podcast () {
|
||||||
echo "Getting Feed..."
|
echo "Getting Feed..."
|
||||||
wget -q $target_url -O -|grep ".mp3"|sed -e 's/<[^>]*>//g'>.holding_file.txt
|
wget -q $target_url -O -|grep ".mp3"|sed -e 's/<[^>]*>//g'>.holding_file.txt
|
||||||
echo "Getting Podcast..."
|
echo "Getting Podcast..."
|
||||||
wget -i .holding_file.txt
|
wget -i .holding_file.txt
|
||||||
rm .holding_file.txt
|
rm .holding_file.txt
|
||||||
echo "Download Finished."
|
echo "Download Finished."
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$1" != "" ]
|
||||||
|
then
|
||||||
|
grab_podcast
|
||||||
|
elif [ "$1" == "" ]
|
||||||
|
then
|
||||||
|
printf "No input given. Please supply a URL\nExiting.\n"
|
||||||
|
fi
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user