-
Notifications
You must be signed in to change notification settings - Fork 35
/
build.sh
executable file
·47 lines (35 loc) · 1.14 KB
/
build.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
47
#!/bin/sh
# Toolchain params
TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-$HOME/arm-webos-linux-gnueabi_sdk-buildroot}
TOOLCHAIN_ENV_FILE=${TOOLCHAIN_DIR}/environment-setup
EXEC_FILE=`readlink -f $0`
EXEC_DIR=`dirname ${EXEC_FILE}`
SERVICE_DIR=${EXEC_DIR}/service
echo "* Using toolchain dir: ${TOOLCHAIN_DIR}"
echo "* Activating toolchain env"
source ${TOOLCHAIN_ENV_FILE} || exit 1
npm run clean || exit 1
echo ":: Frontend ::"
npm run build || exit 1
echo ":: Service ::"
npm run build-service || exit 1
echo ":: HyperHDR ::"
mkdir -p ${EXEC_DIR}/dist/service/hyperhdr
cp -r ${EXEC_DIR}/hyperhdr/* ${EXEC_DIR}/dist/service/hyperhdr/ || exit 1
echo ":: Ensure executable bit set ::"
for file in autostart.sh loader_service start_hyperhdr
do
FILE="${EXEC_DIR}/dist/service/${file}"
echo "=> ${FILE}"
chmod +x ${FILE}
done
for file in hyperhdr hyperhdr-remote flatc flathash
do
FILE="${EXEC_DIR}/dist/service/hyperhdr/${file}"
echo "=> ${FILE}"
chmod +x ${FILE}
done
echo ":: Copy HDR LUT"
unxz -dc ${EXEC_DIR}/resources/flat_lut_lin_tables.3d.xz > ${EXEC_DIR}/dist/service/hyperhdr/flat_lut_lin_tables.3d
echo ":: Package into IPK ::"
npm run package || exit 1