avoid spawning whoami to get username in tools/install-gnuarm4.sh

This commit is contained in:
dn337t@gmail.com 2012-06-22 13:46:56 +00:00
parent 70049c47db
commit ef928a0e8b

View file

@ -81,7 +81,7 @@ GPG_OPTS="--keyring ${GNU_KEYRING_GPG} --no-default-keyring --homedir ."
# End of configuration section. You shouldn't have to modify anything below.
############################################################################
if [[ `whoami` != "root" ]]; then
if [[ "$USER" != "root" ]]; then
echo "*** Warning! Not running as root!"
echo "Installation may fail if you do not have appropriate permissions!"
fi