about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Wong <lambda.fairy@gmail.com>2015-05-13 09:56:25 +1200
committerChris Wong <lambda.fairy@gmail.com>2015-05-13 10:17:59 +1200
commit2c0db5e331b2b15633fc9028cf019f6a2fe48a6f (patch)
treeb9a859c28608a90b8c2d6acbc351e78e1f962f3f
parent939c53ea42bc677dbce9755a77bd55a5d47f8185 (diff)
downloadrust-2c0db5e331b2b15633fc9028cf019f6a2fe48a6f.tar.gz
rust-2c0db5e331b2b15633fc9028cf019f6a2fe48a6f.zip
Use `printf %s` instead of `echo -n` in build script
According to POSIX, the behavior of `echo -n` is "implementation
defined". So we can't guarantee that it gives the same result
everywhere.

See also:
* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
* http://unix.stackexchange.com/q/65803/9814
-rw-r--r--mk/main.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/mk/main.mk b/mk/main.mk
index 20323adaea1..60f5114f0ae 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -22,7 +22,7 @@ CFG_PRERELEASE_VERSION=.1
 
 # Append a version-dependent hash to each library, so we can install different
 # versions in the same place
-CFG_FILENAME_EXTRA=$(shell echo -n $(CFG_RELEASE) | $(CFG_HASH_COMMAND))
+CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE) | $(CFG_HASH_COMMAND))
 
 ifeq ($(CFG_RELEASE_CHANNEL),stable)
 # This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"