File: update-website

package info (click to toggle)
sbws 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,084 kB
  • sloc: python: 10,432; sh: 146; makefile: 38
file content (29 lines) | stat: -rwxr-xr-x 552 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -e
function cleanup {
        echo -n ''
}
trap cleanup EXIT

function fail_hard {
        echo "$1"
        exit 1
}

make=$(which gmake &>/dev/null && echo "gmake" || echo "make")
sbws_repo="$(realpath $1)"
venv="$sbws_repo/venv"

[ -d "$venv" ] || fail_hard "$venv doesn't exist"
[ ! -z "$sbws_repo" ] || fail_hard "$0 <sbws_repo>"
[ -d "$sbws_repo" ] || fail_hard "$sbws_repo doesn't exist"

pushd "$sbws_repo"

git pull
source "$venv/bin/activate"
pip install -U --upgrade-strategy eager .[doc]

pushd docs
$make html
popd