version two of full-rebuild.sh