build.sh: Use 'id -u -n' instead of 'whoami' for POSIX compatibility
authorW. Trevor King <wking@tremily.us>
Sat, 29 Nov 2014 16:57:09 +0000 (08:57 -0800)
committerW. Trevor King <wking@tremily.us>
Sat, 29 Nov 2014 17:01:42 +0000 (09:01 -0800)
'whoami' isn't in the POSIX spec, but 'id -u -n' is in POSIX and does
the same thing [2].

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/id.html#tag_20_59_18

build.sh

index 4405ce83a2cba73cbe4b3629449a9110dc72ddab..c8271101d76dd1167a73166d4ecd13e4001d78eb 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -26,7 +26,7 @@
 # POSSIBILITY OF SUCH DAMAGE.
 
 AUTHOR="${AUTHOR:-W. Trevor King <wking@tremily.us>}"
-NAMESPACE="${NAMESPACE:-$(whoami)}"
+NAMESPACE="${NAMESPACE:-$(id -u -n)}"
 DATE="${DATE:-20141023}"
 MIRROR="${MIRROR:-http://distfiles.gentoo.org/}"
 ARCH_URL="${ARCH_URL:-${MIRROR}releases/amd64/autobuilds/${DATE}/}"