Currently, create-vanilla-SCDB.sh expects to be run from the git repo checkout and copies every thing from its "grand parent" directory into the new SCDB. This doesn't work if it is run from somewhere else, for example a production SCDB.
The solution is to check if it is run from the Git repo (check presence of .git directory) and if not, checkout the SCDB repo and use this checkout to create the new SCDB.