Collection of DPF-based plugins for packaging
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.

48 lines
854B

  1. #!/bin/bash
  2. # the realpath function is not available on some systems
  3. if ! which realpath &>/dev/null; then
  4. function realpath() {
  5. [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
  6. }
  7. fi
  8. set -e
  9. BIN_DIR=${1}
  10. if [ -z "${BIN_DIR}" ]; then
  11. BIN_DIR=bin
  12. fi
  13. if [ ! -d ${BIN_DIR} ]; then
  14. echo "Please run this script from the source root folder"
  15. exit
  16. fi
  17. PWD="$(dirname "${0}")"
  18. if [ -f "${PWD}/lv2_ttl_generator.exe" ]; then
  19. GEN="$(realpath ${PWD}/lv2_ttl_generator.exe)"
  20. EXT=dll
  21. else
  22. GEN="$(realpath ${PWD}/lv2_ttl_generator)"
  23. if [ -d /Library/Audio ]; then
  24. EXT=dylib
  25. else
  26. EXT=so
  27. fi
  28. fi
  29. cd ${BIN_DIR}
  30. FOLDERS=`find . -type d -name \*.lv2`
  31. for i in ${FOLDERS}; do
  32. cd ${i}
  33. FILE="$(ls *.${EXT} 2>/dev/null | sort | head -n 1)"
  34. if [ -n "${FILE}" ]; then
  35. ${EXE_WRAPPER} "${GEN}" "./${FILE}"
  36. fi
  37. cd ..
  38. done