[OE-core] [oe-core][PATCH] base-files: set dynamic COLUMNS via resize command
Mark Hatle
mark.hatle at windriver.com
Tue Jul 29 13:43:27 UTC 2014
On 7/29/14, 4:03 AM, ting.liu at freescale.com wrote:
> From: Ting Liu <ting.liu at freescale.com>
>
> By default, COLUMNS is set to 80. If possible, run 'resize' to
> determine what the current dimensions are. This avoids the final
> part of long lines overlap the start of the same line.
>
> Signed-off-by: Ting Liu <ting.liu at freescale.com>
> ---
> meta/recipes-core/base-files/base-files/profile | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
> index 0b2d9d7..88ab8d8 100644
> --- a/meta/recipes-core/base-files/base-files/profile
> +++ b/meta/recipes-core/base-files/base-files/profile
> @@ -26,6 +26,10 @@ if [ -d /etc/profile.d ]; then
> unset i
> fi
>
> +if [ -x /usr/bin/resize ];then
> + /usr/bin/resize >/dev/null
> +fi
> +
Not sure how useful this is -- but -- the code should dynamically check for
${bindir} instead of hard code /usr/bin here. On many systems people collapse
'bindir' down to just '/bin'.
So my suggestion would be an accompanying do_install step that corrects this
reference if necessary.. something perhaps like:
if [ "/usr/bin" != "${bindir}" ]; then
sed -i /usr/bin/resize -e "s,/usr/bin/resize,${bindir}/resize,"
fi
I'll leave it to others to discuss the merit of adding resize. (I don't object
BTW).
> export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
>
> umask 022
>
More information about the Openembedded-core
mailing list