From 64566db14bba3a49edc3136eee2c0bc830abfcfa Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Fri, 14 Feb 2020 09:04:49 +0100 Subject: [PATCH] archlinux install_dependencies.sh missing ROOT variable fix See issue listed in https://github.com/openframeworks/openFrameworks/issues/6542 --- scripts/linux/archlinux/install_dependencies.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/linux/archlinux/install_dependencies.sh b/scripts/linux/archlinux/install_dependencies.sh index bfa236627f9..3d54fdbfe9b 100755 --- a/scripts/linux/archlinux/install_dependencies.sh +++ b/scripts/linux/archlinux/install_dependencies.sh @@ -18,8 +18,12 @@ if [ $exit_code != 0 ]; then exit $exit_code fi +# get the root directory of this script +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + # Update addon_config.mk files to use OpenCV 3 or 4 depending on what's installed addons_dir="$(readlink -f "$ROOT/../../../addons")" + $(pkg-config opencv4 --exists) exit_code=$? if [ $exit_code != 0 ]; then @@ -29,4 +33,4 @@ else echo "Updating ofxOpenCV to use openCV4" sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv\s/ADDON_PKG_CONFIG_LIBRARIES =\1opencv4 /g' "$addons_dir/ofxOpenCv/addon_config.mk" sed -i -E 's/ADDON_PKG_CONFIG_LIBRARIES =(.*)opencv$/ADDON_PKG_CONFIG_LIBRARIES =\1opencv4/g' "$addons_dir/ofxOpenCv/addon_config.mk" -fi \ No newline at end of file +fi