blob: d94415f7ec833c428ac7b588376692a64d0747a9 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for leasing.
APPNAME=leasingd
DESCRIPTION="Leasing Server for Swarming Bots"
SYSTEMD=${APPNAME}.service
set -x -e
# Copy files into the right locations in ${ROOT}.
copy_release_files()
{
INSTALL="fakeroot install -D --verbose --backup=none --group=root --owner=root"
INSTALL_DIR="fakeroot install -d --verbose --backup=none --group=root --owner=root"
${INSTALL} --mode=644 -T ./sys/${APPNAME}.service ${ROOT}/etc/systemd/system/${APPNAME}.service
${INSTALL} --mode=755 -T ${GOPATH}/bin/leasing ${ROOT}/usr/local/bin/leasing
${INSTALL_DIR} --mode=755 ${ROOT}/usr/local/share/${APPNAME}/templates
${INSTALL} --mode=644 ./templates/* ${ROOT}/usr/local/share/${APPNAME}/templates
${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
${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
}
source ../bash/release.sh