-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-cmd.sh
41 lines (27 loc) · 939 Bytes
/
build-cmd.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
37
38
39
40
41
#!/usr/bin/env bash
cd "$(dirname "$0")"
# turn on verbose debugging output
exec 4>&1; export BASH_XTRACEFD=4; set -x
# make errors fatal
set -e
# bleat on references to undefined shell variables
set -u
if [ -z "$AUTOBUILD" ] ; then
exit 1
fi
if [ "$OSTYPE" = "cygwin" ] ; then
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
top="$(pwd)"
stage="$(pwd)/stage"
source_environment_tempfile="$stage/source_environment.sh"
"$AUTOBUILD" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"
SOURCE_DIR="THREE.js"
build=${AUTOBUILD_BUILD_ID:=0}
cat "${SOURCE_DIR}/package.json" | python3 -c "import sys, json; print (json.load(sys.stdin)['version'])" > "$stage/VERSION.txt"
mkdir -p "$stage/js"
mkdir -p "$stage/LICENSES"
cp "${SOURCE_DIR}/src/three.min.js" "$stage/js/"
cp "${SOURCE_DIR}/src/OrbitControls.js" "$stage/js/"
cp "${SOURCE_DIR}/LICENSE.txt" "$stage/LICENSES/THREEJS_LICENSE.txt"