config/path: check for multiple package folders (attempt #3)

This commit is contained in:
vpeter4 2012-07-18 14:56:22 +03:00 committed by Stefan Saraev
parent 9c9bb9b674
commit 9385e6bd43

View File

@ -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