From d13475216d8181fcb0770e28cfd7f08f43447932 Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Mon, 4 Oct 2010 09:48:24 -0600 Subject: [PATCH] added naming options for playlists --- mkplaylist.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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}