src: use su instead of sudo

Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
Maciej Barć committed 2021-01-29 20:05:50 +01:00
1 parent ba34796215
commit c518cd0023
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ if [ -d "${cache}" ]
then
if ! rm -fr "${cache}"
then
sudo rm -fr "${cache}" || exit 1
su root -c "rm -fr ${cache}" || exit 1
fi
else
echo "No pre-generated md5-cache found in ${cache}"
+1 -1
View File
@@ -56,7 +56,7 @@ do
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
then
echo "Switching to the root account"
sudo ebuild "${ebuild}" clean test merge
su root -c "ebuild ${ebuild} clean test merge"
else
ebuild "${ebuild}" clean test merge
fi