File: update-website

package info (click to toggle)
jq 1.6-2.1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 2,236 kB
  • sloc: ansic: 13,418; yacc: 872; sh: 403; lex: 185; makefile: 158; javascript: 50; python: 20
file content (29 lines) | stat: -rwxr-xr-x 502 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

# This script builds the website from the docs directory of
# the current branch and copies it over to the gh-pages
# branch.

set -eu
set -o xtrace

# build website
scriptdir=`dirname "$0"`
cd "$scriptdir"/../docs
rm -rf output
rake build
cd ..

# copy to /tmp
tmpdir=$(mktemp -d -t jq.website.XXXXXXXXXX)
cp -r docs/output/* "$tmpdir"
cp .gitignore "$tmpdir"

# copy to gh-pages
git checkout gh-pages
cp -r "$tmpdir"/* .
cp "$tmpdir"/.gitignore .

# clean up
rm -rf "$tmpdir"
echo SUCCESS