Added message for running local_build.sh from correct folder.

This commit is contained in:
Sandeep Dubey
2018-12-20 02:07:15 +05:30
parent a14ff64cf3
commit 036790e4fb

View File

@@ -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"