rohrpost

A commandline mail client to change the world as we see it.
git clone git://r-36.net/rohrpost
Log | Files | Refs | LICENSE

rpdownload (307B)


      1 #!/bin/sh
      2 
      3 if [ -z "$DOWNLOADER" ];
      4 then
      5 	echo "\$DOWNLOADER should be set for downloading content."
      6 	exit 1
      7 fi
      8 
      9 if [ $# -lt 1 ];
     10 then
     11 	echo "usage: `basename $0` msgid"
     12 	exit 1
     13 fi
     14 
     15 msgid="$*"
     16 
     17 url=$(rpview -- $msgid | awk '/URL:/ {print $2}' | tr -d '\r')
     18 for i in $url
     19 do
     20 	echo $i
     21 	$DOWNLOADER "$i"
     22 done
     23