wm: infra

ref: 45c1a8e584fc2d7d352bc58aadc38389af6a6193
dir: /getaudio/

View raw version
#!/bin/rc
# to download songs and store their metadata

if(! ~ $#* 1){
	echo 'usage: wm/getaudio url' >[1=2]
	exit usage
}

url = $1
file = `{basename $1}
plist = ./plist
if(! test -f $file){
	hget -o $file $url && {echo $url >> $plist && audio/mkplist $file >> $plist}
}