-d tests the folder which is existing but with .in file, so I prefered
the -f to test if the gst file was available which is not the case, so
it fallbacks on the pkg-config
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/766>
_GST_HELPERDIR="${BASH_SOURCE[0]%/*}/../helpers"
-if [[ ! -d "$_GST_HELPERDIR" ]]; then
+if [[ ! -f $_GST_HELPERDIR/gst ]]; then
_GST_HELPERDIR="$(pkg-config --variable=bashhelpersdir gstreamer-1.0)"
else
_GST_HELPERDIR=`cd "$_GST_HELPERDIR"; pwd`
_GST_HELPERDIR="${BASH_SOURCE[0]%/*}/../helpers"
-if [[ ! -d "$_GST_HELPERDIR" ]]; then
+if [[ ! -f $_GST_HELPERDIR/gst ]]; then
_GST_HELPERDIR="$(pkg-config --variable=bashhelpersdir gstreamer-1.0)"
else
_GST_HELPERDIR=`cd "$_GST_HELPERDIR"; pwd`
then
helper="$(pkg-config --variable=helpersdir gstreamer-@GST_API_VERSION@)/gst-completion-helper"
- if [ -x "$helper" ]
+ if [ -x "$helper" ]
then
_GST_HELPER=$helper
fi