#!/bin/bash
#   Utility to help manage numbered regression tests
#
# To add a new test at #7, for example
#   cd Tests
#   ../ScriptsLib/RenumberRegressionTests 7 53 1
#   cp -r 08 07
#   edit Tests-Description.txt (and make same change)
#
# To remove test#4
#   cd Tests
#   rm -rf 04
#   ../ScriptsLib/RenumberRegressionTests 4 53 -1
#   edit Tests-Description.txt (and make same change)

### @todo also automate changes to Tests-Description.txt!!!!

START=$1
END=$2
BY=$3

if [[ "$BY" -gt "0" ]] ; then
  for i in $(seq $END -$BY $START); do
    `printf "git mv %02d %02d\n" $i $(($i + $BY))`
  done
else
  for i in $(seq $(($START+1)) $END); do
    `printf "git mv %02d %02d\n" $i $(($i + $BY))`
  done
fi
