File: make-html

package info (click to toggle)
dhelp 0.6.27
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 580 kB
  • sloc: ruby: 1,193; sh: 551; perl: 372; makefile: 77
file content (32 lines) | stat: -rwxr-xr-x 772 bytes parent folder | download | duplicates (3)
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
30
31
32
#!/bin/sh
# Create HTML document index locally (use system's dhelp document pool)

set -e

mkdir --mode=711 build  2>/dev/null || true
mkdir --mode=711 build/doc 2>/dev/null || true
mkdir --mode=711 build/doc/dhelp 2>/dev/null || true
mkdir --mode=711 build/doc/dhelp/css 2>/dev/null || true
cp -a doc/css/* build/doc/dhelp/css/

RUBYLIB=lib:devtools ruby1.8 -w -e '

PREFIX = "/usr"
DEFAUL_INDEX_ROOT = "#{PREFIX}/share/doc/HTML"

require "dhelp"
require "dhelp/exporter/html"
include Dhelp

pool = Dhelp::DhelpDocumentPool.new
ex = Dhelp::Exporter::Html.new(
  pool, {
    :dir => "'$(pwd)'/build/doc/HTML",
    :templates => "'$(pwd)'/templates"
  })
ex.export()
'

find build/doc -type d -execdir chmod 711 '{}' ';'
find build/doc -type f -execdir chmod 644 '{}' ';'