| #!/bin/bash |
| # Builds and uploads a debian package for leasing. |
| APPNAME=leasing |
| |
| set -x -e |
| |
| # Copy files into the right locations in ${ROOT}. |
| copy_release_files() |
| { |
| INSTALL="install -D --verbose --backup=none" |
| INSTALL_DIR="install -d --verbose --backup=none" |
| |
| ${INSTALL} --mode=644 -T Dockerfile ${ROOT}/Dockerfile |
| ${INSTALL} --mode=755 -T ${GOPATH}/bin/${APPNAME} ${ROOT}/${APPNAME} |
| ${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/${APPNAME}/templates |
| ${INSTALL} --mode=644 ./templates/* ${ROOT}/usr/local/share/${APPNAME}/templates |
| ${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/${APPNAME}/res/img |
| ${INSTALL} --mode=644 ./res/img/* ${ROOT}/usr/local/share/${APPNAME}/res/img |
| ${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/${APPNAME}/isolates |
| ${INSTALL} --mode=644 ./isolates/* ${ROOT}/usr/local/share/${APPNAME}/isolates |
| ${INSTALL} --mode=644 -T ./res/js/core.js ${ROOT}/usr/local/share/${APPNAME}/res/js/core.js |
| ${INSTALL} --mode=644 -T ./res/vul/elements.html ${ROOT}/usr/local/share/${APPNAME}/res/vul/elements.html |
| |
| } |
| |
| source ../bash/docker_build.sh |