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 <[email protected]>
cc: Michael Olbrich <[email protected]>
cc: Marc Kleine-Budde <[email protected]>
---
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
[email protected]

Reply via email to