-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-cmd.sh
46 lines (31 loc) · 978 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
42
43
44
45
46
#!/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="JPEGEncoderJS"
build=${AUTOBUILD_BUILD_ID:=0}
# No known version number so we use an arbitrary one
echo "1.0" > "$stage/VERSION.txt"
case "$AUTOBUILD_PLATFORM" in
windows* | darwin64 | linux*)
mkdir -p "$stage/js"
mkdir -p "$stage/LICENSES"
cp "${SOURCE_DIR}/src/jpeg_encoder_basic.js" "$stage/js/"
cp "${SOURCE_DIR}/LICENSE.txt" "$stage/LICENSES/JPEG_ENCODER_BASIC_LICENSE.txt"
;;
esac