blob: 37191232f758cf139707b1a89436984adc53fd7e [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for alertserver.
APPNAME=alertserverd
DESCRIPTION="Application to alertserver updates for applications."
SYSTEMD=${APPNAME}.service
# Copy files into the right locations in ${ROOT}.
copy_release_files()
{
INSTALL="sudo install -D --verbose --backup=none --group=root --owner=root"
INSTALL_DIR="sudo 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/alertserver ${ROOT}/usr/local/bin/alertserver
${INSTALL} --mode=644 -T ./alerts.cfg ${ROOT}/etc/skiaalertserver/alerts.cfg
${INSTALL} --mode=644 -T ./res/vul/elements.html ${ROOT}/usr/local/share/skiaalertserver/res/vul/elements.html
${INSTALL} --mode=644 -T ./res/js/core.js ${ROOT}/usr/local/share/skiaalertserver/res/js/core.js
${INSTALL} --mode=644 -T ./templates/header.html ${ROOT}/usr/local/share/skiaalertserver/templates/header.html
${INSTALL} --mode=644 -T ./templates/alerts.html ${ROOT}/usr/local/share/skiaalertserver/templates/alerts.html
${INSTALL} --mode=644 -T ./templates/rules.html ${ROOT}/usr/local/share/skiaalertserver/templates/rules.html
${INSTALL_DIR} --mode=777 ${ROOT}/mnt/pd0/alertserver_workdir
}
source ../bash/release.sh