git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1071
959494ce-11ee-0310-bf91-
de5d638817bd
cmdline=(mplayer -fs)
while [ "${1:0:1}" = - ]; do
cmdline=(mplayer -fs)
while [ "${1:0:1}" = - ]; do
unset delay
if [ -r "$ifile" ]; then
unset delay
if [ -r "$ifile" ]; then
- delay="`sed -n 's/delay *: *\([^ ]*\)$/\1/p' <"$ifile"`"
+ delay="$(sed -n 's/delay *: *\([^ ]*\)$/\1/p' <"$ifile")"
cmdline=("${cmdline[@]}" -delay "$delay")
else
cmdline=("${cmdline[@]}" "${defopts[@]}")
cmdline=("${cmdline[@]}" -delay "$delay")
else
cmdline=("${cmdline[@]}" "${defopts[@]}")
if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi
"${cmdline[@]}" "$file"
if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi
"${cmdline[@]}" "$file"
+
+if [ "$nextep" = y ]; then
+ echo "0. Save and continue"
+ echo "1. Continue without saving"
+ echo "2. Save and exit"
+ echo "3. Exit without saving"
+ IFS= read -sn1 c
+ save=n
+ cont=n
+ case "$c" in
+ 0|" ")
+ save=y
+ cont=y
+ ;;
+ 1)
+ cont=y
+ ;;
+ 2|$'\e')
+ save=y
+ ;;
+ esac
+ if [ "$save" = y ]; then
+ echo "$(($ep + 1))" >nextep
+ fi
+ if [ "$cont" = y ]; then
+ exec "${origargs[@]}"
+ fi
+fi