From 5e5c676d16ac6247c4f3d1e9399a63a4629f5674 Mon Sep 17 00:00:00 2001 From: silverwizard Date: Sat, 9 Jun 2018 12:02:36 -0400 Subject: [PATCH] Updated to add a host option --- pod2mpd | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pod2mpd b/pod2mpd index d58aaff..31ca6ec 100755 --- a/pod2mpd +++ b/pod2mpd @@ -3,10 +3,13 @@ myname="$0" fetchcmd=curl filter=cat +hostarg="" +eval cast=\${$#} -args=$(getopt fi $*) + +args=$(getopt fih $*) if [ $? -ne 0 ]; then - echo "Usage: $myname [-fi] linktorss" >& 2 + echo "Usage: $myname [-fih] linktorss" >& 2 exit 1 fi @@ -24,14 +27,18 @@ while [ "$1" != -- ]; do exit 1 fi ;; + -h) + hostarg="--host=$3" + ;; esac shift done shift -if [ "$#" -eq 1 ]; then - $fetchcmd $1|grep "&2 + echo $0 $1 $2 $3 $4 $5 + echo "Usage: $myname [-fih] linktorss" >&2 exit 1 fi