[OE-core] [PATCH 1/1] oe-init-build-env, scripts/oe-buildenv-internal: add error detecting for $BDIR

Phil Blundell philb at gnu.org
Thu Aug 4 14:53:41 UTC 2011


On Thu, 2011-08-04 at 22:49 +0800, Cui, Dexuan wrote:
> +        BDIR=`readlink -f "$BDIR"`
> +        if [ -z "$BDIR" ]; then
> +            PARENTDIR=`dirname "$1"`
> +            echo >&2 "Error: the directory $PARENTDIR does not exist?"
>              return 1
>          fi
>      fi

Just out of curiosity, could you not just do "mkdir -p $BDIR" and avoid
this whole set of complicated tests?  Or is there some reason why it's
actually important to know whether the parent directory existed already?

p.






More information about the Openembedded-core mailing list