From 9385e6bd431af6535ea1fdf7684376d7e5576fe9 Mon Sep 17 00:00:00 2001 From: vpeter4 Date: Wed, 18 Jul 2012 14:56:22 +0300 Subject: [PATCH] config/path: check for multiple package folders (attempt #3) --- config/path | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/path b/config/path index 9262dbc787..2bdd0e24eb 100644 --- a/config/path +++ b/config/path @@ -56,8 +56,9 @@ SED="sed -i" if [ -n "$1" ]; then PKG_DIR=`find $PACKAGES -type d -name $1 2>/dev/null` - if [ $PKG_DIR = *$'\n'* ]; then - echo -e "Error - multiple package folders:\n$PKG_DIR" + if [ "${PKG_DIR}" != "$(echo $PKG_DIR | tr -d '\n')" ]; then + echo "Error - multiple package folders:" + echo "$PKG_DIR" exit 1 fi fi