]> code.ossystems Code Review - openembedded-core.git/commitdiff
Wrap output at 80 columns for poky-env-internal
authorDarren Hart <darren@dvhart.com>
Tue, 17 Aug 2010 03:14:49 +0000 (20:14 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 21 Sep 2010 22:38:00 +0000 (23:38 +0100)
The output of:

$ source poky-init-build-env

would wrap on 80 character terminals, making the output difficult to read.
Replace the somewhat clumsy repeated usage of "echo" with bash here documents,
limiting line length to 80 characters. The use of here documents simplifies this
by removing any leading commands or indentation from the output being generated.
A bash'ism should be acceptable here as poky-init-build-env already aborts if
the shell is not bash.

Signed-off-by: Darren Hart <darren@dvhart.com>
scripts/poky-env-internal

index 5250e5f545e8205ed89fd52490eac793d7583769..f425bab07969005c6360a255f74335c18e50df51 100755 (executable)
@@ -62,13 +62,17 @@ if [ "x" = "x$POKYLOCALCONF" ]; then
     POKYLOCALCONF="$OEROOT/meta/conf/local.conf.sample"
 fi
 if ! (test -r "$BUILDDIR/conf/local.conf"); then
-    echo "You had no conf/local.conf file. Poky has created this configuration file for you"
-    echo "with some default values. You may wish to edit it to use a different MACHINE (target"
-    echo "hardware) or enable parallel build options to take advantage of multiple cores for"
-    echo "example. See the file for more information as common configuration options are commented."
-    echo
-    echo "Also, for more information see the Poky handbook: http://pokylinux.org/doc/poky-handbook.html"
-    echo
+cat <<EOM
+You had no conf/local.conf file. Poky has created this configuration file for
+you with some default values. You may wish to edit it to use a different MACHINE
+(target hardware) or enable parallel build options to take advantage of multiple
+cores for example. See the file for more information as common configuration
+options are commented.
+
+Also, for more information see the Poky handbook:
+http://pokylinux.org/doc/poky-handbook.html
+
+EOM
     cp -f $POKYLOCALCONF $BUILDDIR/conf/local.conf
 fi
 
@@ -76,12 +80,15 @@ if [ "x" = "x$POKYLAYERCONF" ]; then
     POKYLAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample"
 fi
 if ! (test -r "$BUILDDIR/conf/bblayers.conf"); then
-    echo "You had no conf/bblayers.conf file. Poky has created this configuration file for you"
-    echo "with some default values. To add additional metadata layers into your configuration please"
-    echo "add entries to this file."
-    echo
-    echo "For more information see the Poky handbook: http://pokylinux.org/doc/poky-handbook.html"
-    echo
+cat <<EOM
+You had no conf/bblayers.conf file. Poky has created this configuration file for
+you with some default values. To add additional metadata layers into your
+configuration please add entries to this file.
+
+For more information see the Poky handbook:
+    http://pokylinux.org/doc/poky-handbook.html
+
+EOM
 
     # Put the abosolute path to the layers in bblayers.conf so we can run
     # bitbake without the init script after the first run
@@ -109,13 +116,20 @@ unset PYTHONPATH
 # Don't allow custom GConf schema paths to get into the system
 unset GCONF_SCHEMA_INSTALL_SOURCE
 
-echo
-echo "### Shell environment set up for Poky builds. ###"
-echo
-echo "You can now run 'bitbake <target>'"
-echo
-echo "Common targets are poky-image-minimal, poky-image-sato, meta-toolchain or meta-toolchain-sdk"
-echo
-echo "You can also run generated qemu images with a command like 'runqemu qemux86'"
+cat <<EOM
+
+### Shell environment set up for Poky builds. ###
+
+You can now run 'bitbake <target>'
+
+Common targets are:
+    poky-image-minimal
+    poky-image-sato
+    meta-toolchain
+    meta-toolchain-sdk
+
+You can also run generated qemu images with a command like 'runqemu qemux86'
+
+EOM
 
 export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC OEROOT http_proxy ftp_proxy https_proxy no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND"