forked from secondlife/3p-viewer-fonts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-cmd.sh
44 lines (35 loc) · 1.14 KB
/
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
#!/usr/bin/env bash
# turn on verbose debugging output for parabuild logs.
# exec 4>&1; export BASH_XTRACEFD=4; set -x
# make errors fatal
set -e
# complain about unset env variables
set -u
# check autobuild is around or fail
if [ -z "$AUTOBUILD" ] ; then
exit 1
fi
if [ "$OSTYPE" = "cygwin" ] ; then
autobuild="$(cygpath -u $AUTOBUILD)"
else
autobuild="$AUTOBUILD"
fi
STAGING_DIR="$(pwd)"
TOP_DIR="$(dirname "$0")"
SRC_DIR="${TOP_DIR}/src"
# load autobuild provided shell functions and variables
source_environment_tempfile="$STAGING_DIR/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
set +x
. "$source_environment_tempfile"
set -x
LICENSE_DIR="${STAGING_DIR}/LICENSES"
test -d ${LICENSE_DIR} || mkdir ${LICENSE_DIR}
echo "See <FontName>-license.txt for each individual font's license" > "${LICENSE_DIR}/fonts.txt"
fonts_version="1.0.0"
build=${AUTOBUILD_BUILD_ID:=0}
echo "${fonts_version}.${build}" > "${STAGING_DIR}/VERSION.txt"
FONTS_DIR="${STAGING_DIR}/fonts"
test -d ${FONTS_DIR} || mkdir ${FONTS_DIR}
cp -v "${SRC_DIR}"/*.ttf "${FONTS_DIR}"
cp -v "${SRC_DIR}"/*-license.txt "${LICENSE_DIR}"