From: "Andreas Bießmann" <andreas@biessmann.de>
To: PTXdist ML <ptxdist@pengutronix.de>
Cc: "Michael Olbrich" <m.olbrich@pengutronix.de>,
"Andreas Bießmann" <andreas@biessmann.de>,
"Marc Kleine-Budde" <mkl@pengutronix.de>
Subject: [ptxdist] [PATCH v2] setlocalversion: replace echo -n with printf
Date: Fri, 16 Dec 2011 19:18:27 +0100 [thread overview]
Message-ID: <1324059508-45147-1-git-send-email-andreas@biessmann.de> (raw)
In-Reply-To: <1323817619-69036-1-git-send-email-andreas@biessmann.de>
On some systems the 'echo -n "$v"' lead to corrupted
$PTXDIST_VERSION_FULL cause the builtin echo is used which does not know
about -n switch. Instead of just removing the -n switch use printf as
the rest of this script do.
Before this patch my version looks like this:
---8<---
$ ptxdist --version
-n 2011.12.0-00047-g9849e20
--->8---
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
cc: Michael Olbrich <m.olbrich@pengutronix.de>
cc: Marc Kleine-Budde <mkl@pengutronix.de>
---
changes since v1:
- stay at /bin/sh
- replace echo -n by printf as suggested by Marc Kleine-Budde
I tested a .tarball-version with trailing newline and it worked at least for my
/bin/sh (OS X Lion)
scripts/kernel/setlocalversion | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion
index 3e14135..0ece321 100755
--- a/scripts/kernel/setlocalversion
+++ b/scripts/kernel/setlocalversion
@@ -39,7 +39,7 @@ then
test -z "$v" \
&& echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
- echo -n "$v"
+ printf '%s' $v
exit
fi
--
1.7.8
--
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2011-12-16 18:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 23:06 [ptxdist] [PATCH] setlocalversion: use /bin/bash explicitly Andreas Bießmann
2011-12-14 10:51 ` Michael Olbrich
2011-12-14 11:08 ` Marc Kleine-Budde
2011-12-14 11:20 ` Michael Olbrich
2011-12-16 18:18 ` Andreas Bießmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324059508-45147-1-git-send-email-andreas@biessmann.de \
--to=andreas@biessmann.de \
--cc=m.olbrich@pengutronix.de \
--cc=mkl@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox