blob: ff24725ce89b1d588497b1ed8e54cf532208d194 [file] [log] [blame]
#!/bin/bash
# Builds and uploads a debian package for docserver.
APPNAME=docserver
SYSTEMD=${APPNAME}.service
DESCRIPTION="Serves Markdown documents."
DEPENDS=git
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/docserver ${ROOT}/usr/local/bin/docserver
${INSTALL} --mode=644 -T ./res/js/core.js ${ROOT}/usr/local/share/skiadocserver/res/js/core.js
${INSTALL} --mode=644 -T ./res/img/logo.png ${ROOT}/usr/local/share/skiadocserver/res/img/logo.png
${INSTALL} --mode=644 -T ./res/css/docs.css ${ROOT}/usr/local/share/skiadocserver/res/css/docs.css
${INSTALL} --mode=644 -T ./templates/index.html ${ROOT}/usr/local/share/skiadocserver/templates/index.html
${INSTALL_DIR} --mode=777 ${ROOT}/mnt/pd0/docserver/repo
}
source ../bash/release.sh