aboutsummaryrefslogtreecommitdiffstats
path: root/build_tools/prep_tarball
blob: 6fe06c4277c964be3d4b4491b34729c8c6dfd2a1 (plain)
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
#!/bin/sh -e

# This script will be executed by the 'mkrelease' script to do any tasks
# necessary during tarball creation of this project.
#
# It will be executed from the top-level directory of the project.

make -C sounds MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-OPSOUND-WAV WGET=wget DOWNLOAD=wget all
make AWK=awk GREP=grep menuselect-tree

make_tex_docs() {
    # make backup of asterisk.tex because we are going to alter it
    cp asterisk.tex asterisk.tex.orig
    sed -e "s/ASTERISKVERSION/${VERSION}/" asterisk.tex > asterisk_local.tex
    mv asterisk_local.tex asterisk.tex
    rubber --pdf asterisk.tex
    latex2html asterisk.tex
    latex asterisk.tex
    catdvi -e 1 -U asterisk.dvi | sed -re "s/\[U\+2022\]/*/g" | sed -re "s/\[U\+02C6\]/^/g" | sed -re "s/([^^[:space:]])\s+/\1 /g" > asterisk.txt
    # restore backup of asterisk.tex
    mv asterisk.tex.orig asterisk.tex
}

VERSION=`cat .version`
cd doc/tex && make_tex_docs