A simple tool to read a state machine definition from a file and execute the next step in it.
Add the nexstep.sh file to your path.
Create a state file like this:
one=echo one
one_next=two
two=echo two
two_next=three
three=echo three && echo restarting
three_next=one
First, set your starting state in your working directory:
echo one > nextstep.state
Then, run nextstep.sh to execute the next step:
> nextstep <state file>
one
> nextstep <state file>
two
> nextstep <state file>
three
restarting
> nextstep <state file>
one