installCDE: don't hardcode path to whoami

Hi.

Patch removes hardcoded paths to echo and whoami in installation scripts.

Thanks.
This commit is contained in:
Nina Didenko
2019-11-20 22:50:06 +03:00
committed by Jon Trulson
parent 0d70d8b120
commit 8db8a22906
2 changed files with 3 additions and 17 deletions

View File

@@ -96,13 +96,6 @@ else # Build system = HP
PLATFORM=hp-ux
fi
if [ $PLATFORM = "aix" ];
then
USER=`/bin/whoami`
else
USER=`/usr/bin/whoami`
fi
awkit() {
awk '
BEGIN {
@@ -504,7 +497,7 @@ doit()
}
# set permissions for non-links
if [ "${TYPE%link}" = "$TYPE" ]; then
if [ "$USER" = "root" ]; then
if [ $(whoami) = "root" ]; then
chgrp $GROUP $DEST ||
echo "ERROR: \"chgrp $GROUP $DEST\" failed" >&2
chown $OWNER $DEST ||