Javicle - a JSON Video Composition Language
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
896 B

  1. #!/bin/bash
  2. function die () {
  3. echo 1>&2 "${1}"
  4. exit 1
  5. }
  6. function handle_help_request() {
  7. if [[ -z "${2}" ]]; then
  8. return
  9. fi
  10. if [[ ${2} == "-h" || ${2} == "--help" ]]; then
  11. while IFS='' read -r line || [[ -n "$line" ]]; do
  12. if [[ ${line} =~ ^#.* ]]; then
  13. if [[ ! ${line} =~ ^#!/bin/bash.* ]]; then
  14. echo "${line}"
  15. fi
  16. else
  17. break
  18. fi
  19. done <"${1}"
  20. exit 1
  21. fi
  22. }
  23. JVCL_DIR="$(cd "$(dirname "${0}")"/.. && pwd)"
  24. JVCL_JAR="$(find "${JVCL_DIR}"/target -type f -name "jvcl-*-prod.jar" | head -1)"
  25. if [[ -z "${JVCL_JAR}" ]] ; then
  26. mvn -DskipTests=true -Puberjar clean package || die "Error building JVCL jar"
  27. JVCL_JAR="$(find "${JVCL_DIR}"/target -type f -name "jvcl-*-prod.jar" | head -1)"
  28. if [[ -z "${JVCL_JAR}" ]] ; then
  29. die "No JVCL jar file found after successful build"
  30. fi
  31. fi
  32. handle_help_request "${0}" "${1}"