| 1 | #!/bin/sh -e |
| 2 | |
| 3 | # This script will be executed by the 'mkrelease' script to do any tasks |
| 4 | # necessary during tarball creation of this project. |
| 5 | # |
| 6 | # It will be executed from the top-level directory of the project. |
| 7 | |
| 8 | make -C sounds MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-OPSOUND-WAV WGET=wget DOWNLOAD=wget all |
| 9 | |
| 10 | branch=$1 |
| 11 | |
| 12 | if [ -z "$branch" ] |
| 13 | then |
| 14 | echo "No branch specified. Exiting." |
| 15 | exit 1 |
| 16 | fi |
| 17 | |
| 18 | hash unzip 2>&- || { echo >&2 "The unzip application is required but was not found. Aborting."; exit 1; } |
| 19 | |
| 20 | cd doc |
| 21 | echo "Downloading the PDF and HTML documentation from the Asterisk wiki (this will take a minute) ..." |
| 22 | wget https://wiki.asterisk.org/wiki/download/attachments/19005471/Asterisk-$branch-Reference.pdf |
| 23 | wget https://wiki.asterisk.org/wiki/download/attachments/19005471/Asterisk-Admin-Guide.pdf |
| 24 | wget https://wiki.asterisk.org/wiki/download/attachments/19005471/Asterisk-Admin-Guide-$branch.html.zip |
| 25 | echo "Extracting HTML Admin Guide" |
| 26 | unzip Asterisk-Admin-Guide-$branch.html.zip |
| 27 | mv AST/ Asterisk-Admin-Guide/ |
| 28 | rm -f Asterisk-Admin-Guide-$branch.html.zip |
| 29 | echo "Documentation downloaded. Goodbye!" |