blob: 9a2e8569caa56b024ba949943f4cfc8cd952d4c8 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for router-backup.
APPNAME=powercycle-backup
SYSTEMD="${APPNAME}.service"
DESCRIPTION="backup the power-cycle config to GS"
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=755 -T ${GOPATH}/bin/file-backup ${ROOT}/usr/local/bin/${APPNAME}
${INSTALL} --mode=644 -T ./sys/${APPNAME}.service ${ROOT}/etc/systemd/system/${APPNAME}.service
${INSTALL} --mode=644 -T ./service-account.json ${ROOT}/usr/local/share/${APPNAME}/service-account.json
}
source ../bash/release.sh