From: fredrik Date: Sat, 16 May 2009 23:44:40 +0000 (+0000) Subject: planime: Added an option to just print the intended file. X-Git-Url: http://dolda2000.com/gitweb/?p=utils.git;a=commitdiff_plain;h=4f06ae97a651bd02aceb2cd0ab7adc6147c83805;hp=9fc0aa3b64b75da6ea44b8cba44c72f253fee6d5 planime: Added an option to just print the intended file. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1119 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/planime b/planime index dfb8d64..5a0f302 100755 --- a/planime +++ b/planime @@ -56,14 +56,14 @@ findfile() { origargs=("$0" "$@") cmdline=(mplayer -fs -ass) -unset pretend +unset pretend printfile while [ "${1:0:1}" = - ]; do a="$1" shift case "$a" in -h) - echo "usage: planime [-htC] [-s PAR VAL] [NAME-QUAL] [EP|.] [TYPE-QUAL]" >&2 + echo "usage: planime [-htCf] [-A PLAYER-ARGS... ;] [-s PAR VAL] [NAME-QUAL] [EP|.] [TYPE-QUAL]" >&2 exit 0 ;; -t) @@ -88,6 +88,9 @@ while [ "${1:0:1}" = - ]; do saveval="$1" shift ;; + -f) + printfile=y + ;; esac done @@ -216,6 +219,8 @@ if [ "`hostname`" = pc6 -o "`hostname`" = pc7 -a "$DISPLAY" = :1 ]; then chwp=y; if [ -n "$pretend" ]; then echo "${cmdline[@]}" "$file" +elif [ -n "$printfile" ]; then + echo "$file" else if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi "${cmdline[@]}" "$file"