prep_tarball 1.1 KB

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