From ebb9c071685cd92fc5148c3f4da898b1235caee0 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Wed, 7 Oct 2015 08:50:53 -0500 Subject: [PATCH] qtbase: remove redundant directory checks addToSearchPath already checks if the directory exists before adding it to the path; it's not necessary to check it again. --- .../libraries/qt-5/5.5/qtbase/setup-hook.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh index 15d4818ccc7..5bfc672559c 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh @@ -19,21 +19,10 @@ addQtModule() { done fi - if [[ -d "$1/lib/qt5/plugins" ]]; then - addToSearchPath QT_PLUGIN_PATH "$1/lib/qt5/plugins" - fi - - if [[ -d "$1/lib/qt5/imports" ]]; then - addToSearchPath QML_IMPORT_PATH "$1/lib/qt5/imports" - fi - - if [[ -d "$1/lib/qt5/qml" ]]; then - addToSearchPath QML2_IMPORT_PATH "$1/lib/qt5/qml" - fi - - if [[ -d "$1/share" ]]; then - addToSearchPath XDG_DATA_DIRS "$1/share" - fi + addToSearchPath QT_PLUGIN_PATH "$1/lib/qt5/plugins" + addToSearchPath QML_IMPORT_PATH "$1/lib/qt5/imports" + addToSearchPath QML2_IMPORT_PATH "$1/lib/qt5/qml" + addToSearchPath XDG_DATA_DIRS "$1/share" } rmQtModules() {