X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=planime;h=2fca3261428f12681e8c31030a6e81ed59831183;hb=e299213eed6a1a3eb42b6f3647b7b2890f447266;hp=fbc543b56d9b0f82a3d82d1f9268e9562b9dd7b5;hpb=1f6c2e486755266b82b67a7880295f18a3102969;p=utils.git diff --git a/planime b/planime index fbc543b..2fca326 100755 --- a/planime +++ b/planime @@ -63,6 +63,9 @@ file= tqual= if [ $# -eq 0 ]; then nextep=y + if [ -r curser ]; then + base="$base $(&2 @@ -111,22 +124,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 @@ -157,9 +179,12 @@ if [ "$nextep" = y ]; then ;; esac if [ "$save" = y ]; then - echo "$(($ep + 1))" >nextep + let ep++ + echo "$ep" >nextep fi if [ "$cont" = y ]; then exec "${origargs[@]}" + else + echo "nextep is $ep" fi fi