src: use su instead of sudo
Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
parent
ba34796215
commit
c518cd0023
@ -34,7 +34,7 @@ if [ -d "${cache}" ]
|
|||||||
then
|
then
|
||||||
if ! rm -fr "${cache}"
|
if ! rm -fr "${cache}"
|
||||||
then
|
then
|
||||||
sudo rm -fr "${cache}" || exit 1
|
su root -c "rm -fr ${cache}" || exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No pre-generated md5-cache found in ${cache}"
|
echo "No pre-generated md5-cache found in ${cache}"
|
||||||
|
@ -56,7 +56,7 @@ do
|
|||||||
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
||||||
then
|
then
|
||||||
echo "Switching to the root account"
|
echo "Switching to the root account"
|
||||||
sudo ebuild "${ebuild}" clean test merge
|
su root -c "ebuild ${ebuild} clean test merge"
|
||||||
else
|
else
|
||||||
ebuild "${ebuild}" clean test merge
|
ebuild "${ebuild}" clean test merge
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user