build_oggdraft.sh 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. # Copyright (c) 2012 Xiph.Org Foundation and Mozilla Corporation
  3. #
  4. # This file is extracted from RFC6716. Please see that RFC for additional
  5. # information.
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions
  9. # are met:
  10. #
  11. # - Redistributions of source code must retain the above copyright
  12. # notice, this list of conditions and the following disclaimer.
  13. #
  14. # - Redistributions in binary form must reproduce the above copyright
  15. # notice, this list of conditions and the following disclaimer in the
  16. # documentation and/or other materials provided with the distribution.
  17. #
  18. # - Neither the name of Internet Society, IETF or IETF Trust, nor the
  19. # names of specific contributors, may be used to endorse or promote
  20. # products derived from this software without specific prior written
  21. # permission.
  22. #
  23. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  24. # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  25. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  26. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  27. # OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  28. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  29. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  30. # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  31. # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  32. # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  33. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. #Stop on errors
  35. set -e
  36. #Set the CWD to the location of this script
  37. [ -n "${0%/*}" ] && cd "${0%/*}"
  38. if test -z `which xml2rfc 2> /dev/null`; then
  39. echo "Error: couldn't find xml2rfc."
  40. echo
  41. echo "Please install xml2rfc version 2 or later."
  42. echo "E.g. 'pip install xml2rfc' or follow the instructions"
  43. echo "on http://pypi.python.org/pypi/xml2rfc/ or tools.ietf.org."
  44. exit 1
  45. fi
  46. echo running xml2rfc
  47. # version 2 syntax
  48. xml2rfc draft-ietf-codec-oggopus.xml --text --html