File: create.sh

package info (click to toggle)
fvwm-crystal 3.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 21,700 kB
  • ctags: 1,494
  • sloc: sh: 3,265; cs: 1,335; python: 875; makefile: 214
file content (38 lines) | stat: -rwxr-xr-x 790 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
33
34
35
36
37
38
#!/bin/bash

asciidoc_files=(fvwm-crystal ApplicationDatabase CrystalRoxHOWTO FAQ KeyboardBindings MouseBindings Tips)

dodoc() {
    a2x -vf manpage $1
    if [[ $? != "0" ]]; then exit 1; fi
    echo -e "\n**************************************************************************"
    echo -e "**************************************************************************\n"
    asciidoc -v $1
    if [[ $? != "0" ]]; then exit 1; fi

}

controldoc() {
    for name in ${asciidoc_files[*]}
    do
        dodoc ${name}
    done
    for name in *.1
    do
        mv ${name} ../man/${name}
    done

    for name in *.html
    do
        mv ${name} ../doc/html/${name}
    done
}

if [ $# -eq 0 ]
then
    controldoc
else
    dodoc $1
    mv *.1 ../man
    mv $1.html ../doc/html/$1.html
fi