From 2cedaafbe4561c84e0ff8cc737938aa4014c1233 Mon Sep 17 00:00:00 2001 From: vpeter4 Date: Sun, 28 Sep 2014 10:53:20 +0200 Subject: [PATCH] path: fix folders returned by find command redirect errors in function get_build_dir() --- config/functions | 4 ++-- config/path | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/functions b/config/functions index f2ea2271a5..8ecf2cd9c7 100644 --- a/config/functions +++ b/config/functions @@ -82,11 +82,11 @@ get_module_dir() { # get package's build dir get_build_dir() { if [ ! -z $1 ] ; then - local _PKG_DIR=$(find $ROOT/projects/$PROJECT/packages -name $1) + local _PKG_DIR=$(find $ROOT/projects/$PROJECT/packages -name $1 2>/dev/null) if [ -d "$_PKG_DIR" -a -f $_PKG_DIR/package.mk ] ; then . $_PKG_DIR/package.mk else - local _PKG_DIR=$(find $ROOT/packages -name $1) + local _PKG_DIR=$(find $ROOT/packages -name $1 2>/dev/null) if [ -d "$_PKG_DIR" -a -f $_PKG_DIR/package.mk ] ; then . $_PKG_DIR/package.mk fi diff --git a/config/path b/config/path index 8defcd927a..79ec3c5b76 100644 --- a/config/path +++ b/config/path @@ -69,7 +69,7 @@ SED="sed -i" # first check project folder for a package FOUND=0 ALL_DIRS="" - for DIR in $ROOT/`find projects/$PROJECT/packages -type d -name $_PKG_ROOT_NAME ! -wholename \*\/source\/\* 2>/dev/null` ; do + for DIR in `find $ROOT/projects/$PROJECT/packages -type d -name $_PKG_ROOT_NAME ! -wholename \*\/source\/\* 2>/dev/null` ; do # keep track of dirs with meta for debugging if [ -z "$ALL_DIRS" ] ; then ALL_DIRS="$DIR" @@ -93,7 +93,7 @@ SED="sed -i" if [ $FOUND -eq 0 ] ; then FOUND=0 ALL_DIRS="" - for DIR in $ROOT/`find $PACKAGES -type d -name $_PKG_ROOT_NAME ! -wholename \*\/source\/\* 2>/dev/null` ; do + for DIR in `find $ROOT/$PACKAGES -type d -name $_PKG_ROOT_NAME ! -wholename \*\/source\/\* 2>/dev/null` ; do # keep track of dirs with meta for debugging if [ -z "$ALL_DIRS" ] ; then ALL_DIRS="$DIR"