src: use su instead of sudo

Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
Maciej Barć 2021-01-29 20:05:50 +01:00
parent ba34796215
commit c518cd0023
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
2 changed files with 2 additions and 2 deletions

View File

@ -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}"

View File

@ -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