forked from FIRST-Tech-Challenge/fmltc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
env_setup.sh
executable file
·36 lines (33 loc) · 1.21 KB
/
env_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Check that gcloud is available.
which gcloud >/dev/null
if [ $? -ne 0 ]; then
echo "Please install the Google Cloud SDK."
exit 1
fi
# Check that the Google Cloud project id is set.
FMLTC_GCLOUD_PROJECT_ID=$(gcloud config list --format='text(core.project)' 2>/dev/null | grep ^project: | colrm 1 9)
if [ "$FMLTC_GCLOUD_PROJECT_ID" != "" ]; then
export FMLTC_GCLOUD_PROJECT_ID
echo "FMLTC_GCLOUD_PROJECT_ID is $FMLTC_GCLOUD_PROJECT_ID"
else
echo "Please set the Google Cloud Project ID."
exit 1
fi
# Locate the Google Closure Compiler.
if [ -f ../closure-compiler/closure-compiler-v20200406.jar ]; then
FMLTC_CLOSURE_COMPILER_JAR="../closure-compiler/closure-compiler-v20200406.jar"
export FMLTC_CLOSURE_COMPILER_JAR
echo "FMLTC_CLOSURE_COMPILER_JAR is $FMLTC_CLOSURE_COMPILER_JAR"
else
echo "Please install the Google Closure Compiler"
exit 1
fi
# Locate the Google Closure Library.
if [ -f ../closure-library/closure-library-20200406/closure/goog/base.js ]; then
FMLTC_CLOSURE_LIBRARY_FOLDER="../closure-library/closure-library-20200406"
export FMLTC_CLOSURE_LIBRARY_FOLDER
echo "FMLTC_CLOSURE_LIBRARY_FOLDER is $FMLTC_CLOSURE_LIBRARY_FOLDER"
else
echo "Please install the Google Closure Library"
exit 1
fi