-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.sh
executable file
·44 lines (33 loc) · 1022 Bytes
/
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
#!/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 ":: Hyperion.NG ::"
mkdir -p ${EXEC_DIR}/dist/service/hyperion
cp -r ${EXEC_DIR}/hyperion/* ${EXEC_DIR}/dist/service/hyperion/ || exit 1
echo ":: Ensure executable bit set ::"
for file in autostart.sh loader_service start_hyperiond
do
FILE="${EXEC_DIR}/dist/service/${file}"
echo "=> ${FILE}"
chmod +x ${FILE}
done
for file in hyperiond hyperion-remote
do
FILE="${EXEC_DIR}/dist/service/hyperion/${file}"
echo "=> ${FILE}"
chmod +x ${FILE}
done
echo ":: Package into IPK ::"
npm run package || exit 1