Merge "rtp_engine.h: Remove extraneous semicolons."
[asterisk/asterisk.git] / build_tools / prep_tarball
index 6fe06c4..8b4705e 100755 (executable)
@@ -6,20 +6,24 @@
 # 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
-}
+branch=$1
 
-VERSION=`cat .version`
-cd doc/tex && make_tex_docs
+if [ -z "$branch" ]
+then
+       echo "No branch specified. Exiting."
+       exit 1
+fi
+
+hash unzip 2>&- || { echo >&2 "The unzip application is required but was not found. Aborting."; exit 1; }
+
+cd doc
+echo "Downloading the PDF and HTML documentation from the Asterisk wiki (this will take a minute) ..."
+wget https://wiki.asterisk.org/wiki/download/attachments/19005471/Asterisk-$branch-Reference.pdf
+wget https://wiki.asterisk.org/wiki/download/attachments/19005471/Asterisk-Admin-Guide.pdf
+wget https://wiki.asterisk.org/wiki/download/attachments/19005471/Asterisk-Admin-Guide-$branch.html.zip
+echo "Extracting HTML Admin Guide"
+unzip Asterisk-Admin-Guide-$branch.html.zip
+mv AST/ Asterisk-Admin-Guide/
+rm -f Asterisk-Admin-Guide-$branch.html.zip
+echo "Documentation downloaded. Goodbye!"