forked from NodeOS/NodeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild
More file actions
executable file
·41 lines (30 loc) · 932 Bytes
/
build
File metadata and controls
executable file
·41 lines (30 loc) · 932 Bytes
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
TOOLCHAIN=`pwd`/node_modules/nodeos-cross-toolchain
source $TOOLCHAIN/scripts/adjustEnvVars.sh || exit $?
#
# Build each layer up
#
( cd node_modules/nodeos-barebones ; npm run build ) &&
( cd node_modules/nodeos-initramfs ; npm run build ) &&
( cd node_modules/nodeos-rootfs ; npm run build ) &&
( cd node_modules/nodeos-usersfs ; npm run build ) || err $?
#
# Wrap the system up and pack it
#
OUT_DIR=`pwd`/out/$CPU_FAMILY/$PLATFORM
mkdir -p $OUT_DIR
case $PLATFORM in
*_qemu|docker|vagga)
cp node_modules/nodeos-barebones/out/latest $OUT_DIR/barebones
cp node_modules/nodeos-initramfs/out/latest $OUT_DIR/initramfs
;;
*_iso|*_img)
cp node_modules/nodeos-rootfs/out/latest $OUT_DIR/rootfs
;;
*)
echo -e "${RED}Unknown platform '$PLATFORM'${CLR}"
exit 10
;;
esac
cp node_modules/nodeos-usersfs/out/latest $OUT_DIR/usersfs
ln -sfn $CPU_FAMILY/$PLATFORM out/latest