| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
pluginpkg="dssi-example-plugins" |
| 4 |
hostpkg="dssi-host-jack" |
| 5 |
|
| 6 |
pluginhost=/usr/bin/jack-dssi-host |
| 7 |
plugin=$(basename $0) |
| 8 |
|
| 9 |
error() { |
| 10 |
echo "$*" 1>&2 |
| 11 |
} |
| 12 |
|
| 13 |
if [ ! -x "${pluginhost}" ]; then |
| 14 |
error "Please install the '${hostpkg}' package to run DSSI-plugins as standalone" |
| 15 |
exit 1 |
| 16 |
fi |
| 17 |
|
| 18 |
archmatch=false |
| 19 |
archdirs="" |
| 20 |
for f in /usr/lib/*/dssi/${plugin}.so; do |
| 21 |
test -e "${f}" || continue |
| 22 |
d="${f%/*}" |
| 23 |
archdirs="${archdirs} ${d}" |
| 24 |
if grep -aq ":${d}:" "${pluginhost}"; then |
| 25 |
archmatch=true |
| 26 |
fi |
| 27 |
done |
| 28 |
|
| 29 |
if [ "${archmatch}" = "false" ]; then |
| 30 |
error "" |
| 31 |
error "It seems as if ${pluginhost} has the wrong architecture to load plugins from ${archdirs}" |
| 32 |
error "Make sure to install the '${pluginpkg}' package matching the architecture of the '${hostpkg}' package" |
| 33 |
error "" |
| 34 |
dpkg -l "${hostpkg}" "${pluginpkg}" 1>&2 |
| 35 |
error "" |
| 36 |
error "Continuing anyhow." |
| 37 |
fi |
| 38 |
|
| 39 |
"${pluginhost}" "${plugin}.so" |