From: fredrik Date: Mon, 6 Aug 2007 01:22:51 +0000 (+0000) Subject: Fixed parameter saving and reading. X-Git-Url: http://dolda2000.com/gitweb/?p=utils.git;a=commitdiff_plain;h=b8882e5fc2619da17b715ea571c14a4e86bd2db5 Fixed parameter saving and reading. Fixed tqual bug. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1091 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/planime b/planime index 004aa2a..62c01a4 100755 --- a/planime +++ b/planime @@ -96,7 +96,7 @@ if [ "$nextep" = y -a -r nextep ]; then fi fi if [ -z "$file" ]; then - file="$(findfile "$base - " "$ep" "$qual")" + file="$(findfile "$base - " "$ep" "$tqual")" fi if [ -z "$file" -o ! -r "$file" ]; then @@ -113,22 +113,31 @@ case "${file##*.}" in ;; esac -ifile=".${ep}.info" +ifile=".${file}.info" if [ -n "$savepar" ]; then if [ -r "$ifile" ]; then - egrep -v "^${savepar}:" "$ifile" >"$ifile.new" + egrep -v "^${savepar} " "$ifile" >"$ifile.new" mv -f "$ifile.new" "$ifile" fi - echo "$savepar: $saveval" >>"$ifile" + echo "$savepar $saveval" >>"$ifile" exit 0 fi unset delay if [ -r "$ifile" ]; then - delay="$(sed -n 's/delay *: *\([^ ]*\)$/\1/p' <"$ifile")" - cmdline=("${cmdline[@]}" -delay "$delay") + exec 3<&0 + exec 0<"$ifile" + while read par arg; do + if [ "$par" = delay ]; then + cmdline=("${cmdline[@]}" -delay "$arg") + elif [ "$par" = aspect ]; then + cmdline=("${cmdline[@]}" -aspect "$arg") + fi + done + exec 0<&3 + exec 3<&- else cmdline=("${cmdline[@]}" "${defopts[@]}") fi