[V2] oe-setup-builddir: remove unreachable code, update comments
Submitted by Darren Hart on May 25, 2011, 11:53 p.m.
|
Patch ID: 4791
Details
Commit Message
@@ -37,29 +37,26 @@ fi
cd "$BUILDDIR"
-TEMPLATECONF=${TEMPLATECONF:-meta/conf}
#
-# $TEMPLATECONF can point to a directory for the template local.conf & bblayers.conf
+# $TEMPLATECONF can point to a directory for the template local.conf &
+# bblayers.conf. If the user hasn't specified a path, default to
+# meta/conf.
#
-if [ "x" != "x$TEMPLATECONF" ]; then
+TEMPLATECONF=${TEMPLATECONF:-meta/conf}
+if ! (test -d "$TEMPLATECONF"); then
+ # Allow TEMPLATECONF=meta-xyz/conf as a shortcut
+ if [ -d "$OEROOT/$TEMPLATECONF" ]; then
+ TEMPLATECONF="$OEROOT/$TEMPLATECONF"
+ fi
if ! (test -d "$TEMPLATECONF"); then
- # Allow TEMPLATECONF=meta-xyz/conf as a shortcut
- if [ -d "$OEROOT/$TEMPLATECONF" ]; then
- TEMPLATECONF="$OEROOT/$TEMPLATECONF"
- fi
- if ! (test -d "$TEMPLATECONF"); then
- echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf & bblayers.conf"
- return
- fi
+ echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf.sample & bblayers.conf.sample"
+ return
fi
- OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
- OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
fi
+OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample"
+OECORELOCALCONF="$TEMPLATECONF/local.conf.sample"
-if [ "x" = "x$OECORELOCALCONF" ]; then
- OECORELOCALCONF="$OEROOT/meta/conf/local.conf.sample"
-fi
if ! (test -r "$BUILDDIR/conf/local.conf"); then
cat <<EOM
You had no conf/local.conf file. This configuration file has therefore been
@@ -79,9 +76,6 @@ EOM
cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf
fi
-if [ "x" = "x$OECORELAYERCONF" ]; then
- OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample"
-fi
if ! (test -r "$BUILDDIR/conf/bblayers.conf"); then
cat <<EOM
You had no conf/bblayers.conf file. The configuration file has been created for