From d093b2894b5bfe76899f9884fad16b4160ffe561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 26 Feb 2021 10:47:38 +0100 Subject: [PATCH] bash-completion: various bash fixes -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: --- data/bash-completion/completions/gst-inspect-1.0 | 2 +- data/bash-completion/completions/gst-launch-1.0 | 2 +- data/bash-completion/helpers/gst.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/bash-completion/completions/gst-inspect-1.0 b/data/bash-completion/completions/gst-inspect-1.0 index 667e5036f0..25391ae10c 100644 --- a/data/bash-completion/completions/gst-inspect-1.0 +++ b/data/bash-completion/completions/gst-inspect-1.0 @@ -20,7 +20,7 @@ _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` diff --git a/data/bash-completion/completions/gst-launch-1.0 b/data/bash-completion/completions/gst-launch-1.0 index 80ad34c90f..b678c86185 100644 --- a/data/bash-completion/completions/gst-launch-1.0 +++ b/data/bash-completion/completions/gst-launch-1.0 @@ -20,7 +20,7 @@ _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` diff --git a/data/bash-completion/helpers/gst.in b/data/bash-completion/helpers/gst.in index 42cfb26d98..03a50eb445 100644 --- a/data/bash-completion/helpers/gst.in +++ b/data/bash-completion/helpers/gst.in @@ -23,7 +23,7 @@ if [[ ! -x "$_GST_HELPER" ]] then helper="$(pkg-config --variable=helpersdir gstreamer-@GST_API_VERSION@)/gst-completion-helper" - if [ -x "$helper" ] + if [ -x "$helper" ] then _GST_HELPER=$helper fi