tSome changed to rppodplay. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 85fac33ffba9a6b0a6d0704e7283876a7f7576a1
 (DIR) parent e7fa749b0e5eae492e8548ccc42da097aa968e93
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Sat, 13 Oct 2012 09:19:31 +0200
       
       Some changed to rppodplay.
       
       Diffstat:
         bin/rppodplay                       |      24 +++++++++++++-----------
       
       1 file changed, 13 insertions(+), 11 deletions(-)
       ---
 (DIR) diff --git a/bin/rppodplay b/bin/rppodplay
       t@@ -1,25 +1,27 @@
        #!/bin/sh
        
        usage() {
       -        echo "usage: `basename $1` [-d] msgid"
       +        printf "usage: %s [-d] msgid\n" "$(basename $1)" >&2
                exit 1
        }
        
        dodownload=0
       +folder=""
        
       -while getopts "dh" opt;
       +while getopts "dh:" opt;
        do
                case $opt in
       -                d)
       -                        dodownload=1
       -                        ;;
       -                *)
       -                        usage $0
       -                        exit 1
       -                        ;;
       +        d)
       +                dodownload=1
       +                ;;
       +        
       +        *)
       +                usage $0
       +                exit 1
       +                ;;
                esac
        done
       -shift `expr $OPTIND - 1`
       +shift $(($OPTIND - 1))
        
        if [ $dodownload -gt 0 ];
        then
       t@@ -46,7 +48,7 @@ fi
        
        msgid="$*"
        
       -url=`rpview -- $msgid | awk '/Enclosure:/ {print $2}' | tr -d '\r'`
       +url=$(rpview -- $msgid | awk '/Enclosure:/ {print $2}' | tr -d '\r')
        for i in $url
        do
                echo $i