Javicle - a JSON Video Composition Language
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

34 linhas
1.0 KiB

  1. #!/bin/bash
  2. #
  3. # Run JVCL on a spec
  4. #
  5. # Usage:
  6. #
  7. # jvcl [-f spec-file] [-t temp-dir]
  8. #
  9. # If the `-f` option is omitted and no spec-file is provided, then jvcl will try to read
  10. # a spec from stdin.
  11. #
  12. # Every run of JVCL will create a temp directory. You can either specify the name of the directory
  13. # with `-t` (it will be created if it does not exist), or let jvcl create a temp directory for you.
  14. #
  15. # Note: this command will build the jvcl jar file if needed. The first time you run it, it might
  16. # take a long time to start up.
  17. #
  18. function die () {
  19. echo 1>&2 "${1}"
  20. exit 1
  21. }
  22. JVCL_DIR="$(cd "$(dirname "${0}")"/.. && pwd)"
  23. JVCL_JAR="$(find "${JVCL_DIR}"/target -type f -name "jvcl-*.jar" | head -1)"
  24. if [[ -z "${JVCL_JAR}" ]] ; then
  25. mvn -DskipTests=true clean package || die "Error building JVCL jar"
  26. JVCL_JAR="$(find "${JVCL_DIR}"/target -type f -name "jvcl-*.jar" | head -1)"
  27. if [[ -z "${JVCL_JAR}" ]] ; then
  28. die "No JVCL jar file found after successful build"
  29. fi
  30. fi
  31. java -cp "${JVCL_JAR}" jvcl.main.Jvcl "${@}"