From: fredrik Date: Sun, 1 Jul 2007 02:00:36 +0000 (+0000) Subject: If arguments are existing files, play them. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=90aff0d0e0e041b357afb15be9a22608b4f68ab2;p=utils.git If arguments are existing files, play them. Echo nextep after exiting. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1087 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/planime b/planime index fbc543b..004aa2a 100755 --- a/planime +++ b/planime @@ -95,7 +95,9 @@ if [ "$nextep" = y -a -r nextep ]; then exit 1 fi fi -file="$(findfile "$base - " "$ep" "$qual")" +if [ -z "$file" ]; then + file="$(findfile "$base - " "$ep" "$qual")" +fi if [ -z "$file" -o ! -r "$file" ]; then echo "planime: no matching file found" >&2 @@ -157,9 +159,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