diff --git a/mkplaylist.sh b/mkplaylist.sh index afd3f08..3e09c76 100755 --- a/mkplaylist.sh +++ b/mkplaylist.sh @@ -7,10 +7,10 @@ BASEDIR="/media/sansa" DATE=`date +%m%d` LISTNAME="podcast-${DATE}" AUDIODIR="${LISTNAME}" -TMPFILE="/tmp/podcast-${DATE}.tmp" +TMPFILE="/tmp/playlist.tmp" #set debug mode and create some dirs in /tmp -#for testing and/or debugging +#for testing and/or debugging. if [[ $1 == "debug" ]] then BASEDIR="/tmp${BASEDIR}" @@ -26,6 +26,16 @@ then echo "$1" fi +#check for options from cmd ln +if [[ -n $1 ]] +then + LISTNAME=$1 +fi +if [[ -n $2 ]] +then + AUDIODIR=$2 +fi + #mk tmp playlist echo "PLP PLAYLIST" > ${TMPFILE} echo "VERSION 1.20" >> ${TMPFILE}