diff --git a/local_build/local_build.sh b/local_build/local_build.sh index c5122036c..2355555db 100755 --- a/local_build/local_build.sh +++ b/local_build/local_build.sh @@ -20,7 +20,7 @@ # # Usage: local_build.sh. # -# This script generates only local_blockly_compressed.js. You may modify it as +# This script generates only local_blockly_compressed.js. You may modify it as # needed to build other files. # # The compressed file is a concatenation of all of Blockly's core files, run @@ -33,6 +33,16 @@ # - Add a good error message if multiple versions of the closure compiler were # found. +# Note that the root folder MUST be named 'local_build'. + +EXPECTED_PWD='local_build' +if [[ ${PWD##*/} != $EXPECTED_PWD ]]; then + echo "" + echo " WARNING This script should be run from the blockly/local_build folder." + echo "" + exit 1 +fi + # Find the Closure Compiler. if [ -f "$(npm root)/google-closure-compiler/compiler.jar" ]; then COMPILER="$(npm root)/google-closure-compiler/compiler.jar"