# This bash script substitutes a string new for a string old in
# the given files.

for file in "$@"; do
	if test -f $file && [[ $file == *.py ]]
	then
	/cygdrive/c/ProgramData/Anaconda3/python.exe change.py < $file > changeAux
		if test -s changeAux
		then
			echo $file "processed"
			mv changeAux $file
		else
			echo "error in processing" $file
			rm changeAux
		fi
	fi
	if test -d $file
	then
		./call-change $file/*
	fi
	done

