blob: b047ec9a3ec23938aee98c958df0a5a61b8bca54 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for the Power Controller.
APPNAME=power-controller
SYSTEMD="power-controller.service"
DESCRIPTION="The Skia Power Controller offers a semi-automated way to restart swarming bots and devices."
set -x -e
# 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/${APPNAME} ${ROOT}/usr/local/bin/${APPNAME}
${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/img/favicon.ico ${ROOT}/usr/local/share/${APPNAME}/res/img/favicon.ico
${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} --mode=644 -T ../skolo/sys/powercycle.yaml ${ROOT}/etc/powercycle.yaml
}
source ../bash/release.sh