Javicle - a JSON Video Composition Language
Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
|
- #!/bin/bash
- function die () {
- echo 1>&2 "${1}"
- exit 1
- }
-
- function handle_help_request() {
- if [[ -z "${2}" ]]; then
- return
- fi
-
- if [[ ${2} == "-h" || ${2} == "--help" ]]; then
- while IFS='' read -r line || [[ -n "$line" ]]; do
- if [[ ${line} =~ ^#.* ]]; then
- if [[ ! ${line} =~ ^#!/bin/bash.* ]]; then
- echo "${line}"
- fi
- else
- break
- fi
- done <"${1}"
- echo "# Environment Variables
- #
- # JVCL_SCRATCH_DIR : Use this as the scratch directory
- # Default is to create a new temp directory
- #
- # JVCL_NO_EXEC : If set to anything, print the commands that would
- # have run but do not execute anything
- #
- "
- exit 1
- fi
- }
-
- JVCL_DIR="$(cd "$(dirname "${0}")"/.. && pwd)"
- JVCL_JAR="$(find "${JVCL_DIR}"/target -type f -name "jvcl-*-prod.jar" | head -1)"
- if [[ -z "${JVCL_JAR}" ]] ; then
- mvn -DskipTests=true -Puberjar clean package || die "Error building JVCL jar"
- JVCL_JAR="$(find "${JVCL_DIR}"/target -type f -name "jvcl-*-prod.jar" | head -1)"
- if [[ -z "${JVCL_JAR}" ]] ; then
- die "No JVCL jar file found after successful build"
- fi
- fi
-
- SCRATCH_DIR=""
- if [[ -n "${JVCL_SCRATCH_DIR}" ]] ; then
- SCRATCH_DIR="--temp-dir ${JVCL_SCRATCH_DIR}"
- fi
-
- NO_EXEC=""
- if [[ -n "${JVCL_NO_EXEC}" ]] ; then
- NO_EXEC="--no-exec"
- fi
- JVCL_OPTIONS="${SCRATCH_DIR} ${NO_EXEC}"
-
- handle_help_request "${0}" "${1}"
|