Commit 7a6add3a0fd9351afebf34939621fe0734495c45

Authored by 김태훈
1 parent 8f39550cea
Exists in master and in 2 other branches fhd, fhd-demo

Release 스크립트 정리

app/app-prime-modbus/app/app-prime-modbus/Makefile
... ... @@ -4,7 +4,7 @@
4 4  
5 5 CROSS_PREFIX = arm-buildroot-linux-gnueabihf
6 6  
7   -CP_DIR = /nfs/prime_oven/
  7 +CP_DIR = ../../release
8 8  
9 9 ## 사용자 소스
10 10 TARGET = app-prime-modbus
... ...
app/app-prime-modbus/make.sh
... ... @@ -0,0 +1,17 @@
  1 +#!/bin/sh
  2 +
  3 +make -C app/app-prime-modbus/
  4 +
  5 +RET=$?
  6 +if [ ${RET} -ne 0 ]
  7 +then
  8 + exit ${RET}
  9 +fi
  10 +
  11 +if [ -z ${CP_DIR} ]
  12 +then
  13 + CP_DIR=../release
  14 +fi
  15 +
  16 +mkdir -p ${CP_DIR}
  17 +cp -v release/* ${CP_DIR}
... ...
app/gui/make.sh
... ... @@ -9,7 +9,7 @@ fi
9 9  
10 10 if [ -z "$CP_DIR" ]
11 11 then
12   - CP_DIR=/nfs/prime-oven
  12 + CP_DIR=/nfs/prime_oven
13 13 fi
14 14  
15 15 image_filename=${TARGET}
... ...
app/make.sh
... ... @@ -0,0 +1,15 @@
  1 +#!/bin/sh
  2 +
  3 +cd app-prime-modbus
  4 +./make.sh
  5 +cd -
  6 +
  7 +cd gui
  8 +./make.sh
  9 +cd -
  10 +
  11 +cd modbus-data-viewer
  12 +./release.sh
  13 +cd -
  14 +
  15 +
... ...
app/modbus-data-viewer/build.sh
1 1 #!/bin/bash
2 2  
3   -GOPATH=$PWD go get -v service-web
  3 +GOPATH=$PWD go get -v service-web && \
4 4 GOPATH=$PWD GOARCH=arm GOOS=linux go install service-web
  5 +
  6 +exit $?
... ...
app/modbus-data-viewer/release.sh
... ... @@ -2,6 +2,12 @@
2 2  
3 3 ./build.sh
4 4  
  5 +RET=$?
  6 +if [ ${RET} -ne 0 ]
  7 +then
  8 + exit ${RET}
  9 +fi
  10 +
5 11 if [ ! -d release ]; then
6 12 mkdir release
7 13 else
... ... @@ -10,3 +16,15 @@ fi
10 16  
11 17 cp bin/linux_arm/service-web release/service-web
12 18 cp -rf src/service-web/templates release/
  19 +
  20 +if [ -z "$CP_DIR" ]
  21 +then
  22 + CP_DIR=/nfs/prime_oven
  23 +fi
  24 +
  25 +for DEST_DIR in ${CP_DIR}
  26 +do
  27 + echo "copy from release to ${DEST_DIR}"
  28 + mkdir -p ${DEST_DIR}/
  29 + cp -rf release/* ${DEST_DIR}
  30 +done
... ...
app/superdaemon/make.sh
... ... @@ -0,0 +1,8 @@
  1 +#!/bin/sh
  2 +
  3 +if [ -z ${CP_DIR} ]
  4 +then
  5 + CP_DIR=../release
  6 +fi
  7 +
  8 +make && cp -v superdaemon ${CP_DIR}
... ...
release.sh
... ... @@ -12,6 +12,9 @@ KERNEL_OUT_DIR=kernel/output-linux-imx6_3.14.28
12 12 BUILDROOT_SRC_DIR=buildroot/buildroot-2016.08.1
13 13 BUILDROOT_OUT_DIR=buildroot/output-buildroot-2016.08.1
14 14  
  15 +APP_SRC_DIR=app
  16 +APP_OUT_DIR=app/release
  17 +
15 18 TAG=`git log -1 --pretty=format:%h`
16 19 IMAGE_DIR=`realpath $(pwd)/../images_${TAG}`
17 20  
... ... @@ -42,4 +45,13 @@ echo "=============================================="
42 45 CP_DIR=${IMAGE_DIR} ./make.sh image
43 46 cd -
44 47  
  48 +cd ${APP_SRC_DIR}
  49 +echo "=============================================="
  50 +echo " Build applications [ $(pwd) ]"
  51 +echo " IMAGE_DIR: ${IMAGE_DIR}"
  52 +echo "=============================================="
  53 +
  54 +CP_DIR=${IMAGE_DIR} ./make.sh
  55 +cd -
  56 +
45 57 cp -Ra files/* ${IMAGE_DIR}
... ...