1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#!/bin/sh
## simple script to run Gem from the build
## Pd binary can be overriden by setting the PD environment
if [ "x${PD}" = "x" ]; then
PD="@PD_EXE@"
if [ "x${PD#@}" != "x${PD}" ]; then
PD=""
fi
fi
if [ "x${PD}" = "x" ]; then
PD=pd
fi
## provide replacement for realpath
which realpath >/dev/null 2>&1 || realpath() { [ "x${1#/}" != "x$1" ] && echo "$1" || echo "$PWD/${1#.}"; }
## search abstractions (both static ones and built ones)
srcdir=$(realpath @abs_top_srcdir@)
builddir=$(realpath @abs_top_builddir@)
gempath=
if [ -d "${srcdir}/abstractions" ]; then
gempath=${srcdir}/abstractions:${gempath}
fi
if [ -d "${builddir}" ]; then
if [ "x${srcdir}" != "x${builddir}" ]; then
gempath=${builddir}/abstractions:${gempath}
fi
gempath=${builddir}:${gempath}
else
builddir=${0%/*}
fi
gempath=${gempath%:}
if [ "x${gempath}" = "x" ]; then
gempath=${builddir}
fi
${PD} -stderr -oss -nosound -path "${gempath}" -lib ${builddir}/Gem "$@"
|