comparison DPF-Prymula-audioplugins/dpf/utils/generate-ttl.sh @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 #!/bin/bash
2
3 # function not available on some systems
4 if ! which realpath &>/dev/null; then
5 function realpath() {
6 [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
7 }
8 fi
9
10 set -e
11
12 if [ ! -d bin ]; then
13 echo "Please run this script from the source root folder"
14 exit
15 fi
16
17 PWD="$(dirname "${0}")"
18
19 if [ -f "${PWD}/lv2_ttl_generator.exe" ]; then
20 GEN="${PWD}/lv2_ttl_generator.exe"
21 EXT=dll
22 else
23 GEN="$(realpath ${PWD}/lv2_ttl_generator)"
24 if [ -d /Library/Audio ]; then
25 EXT=dylib
26 else
27 EXT=so
28 fi
29 fi
30
31 cd bin
32 FOLDERS=`find . -type d -name \*.lv2`
33
34 for i in ${FOLDERS}; do
35 cd ${i}
36 FILE="$(ls *.${EXT} 2>/dev/null | sort | head -n 1)"
37 if [ -n "${FILE}" ]; then
38 ${EXE_WRAPPER} "${GEN}" "./${FILE}"
39 fi
40 cd ..
41 done