1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

Build: Use fakeroot if non-root build is possible

If genext2fs and fakeroot are installed, the build will no longer
require superuser privileges.
This commit is contained in:
Nikolay Kochulin 2020-05-08 23:50:45 +03:00 committed by Andreas Kling
parent 0399b38f77
commit 3d342f72a7
3 changed files with 47 additions and 40 deletions

View file

@ -16,7 +16,9 @@ while [ "$1" != "" ]; do
shift
done
sudo id
if ! (command -v genext2fs 1>/dev/null && command -v fakeroot 1>/dev/null); then
sudo id
fi
MAKE="make"
@ -27,11 +29,11 @@ fi
if [ "$fast_mode" = "1" ]; then
$MAKE -C ../ && \
$MAKE -C ../ install &&
sudo -E PATH="$PATH" ./build-image-qemu.sh
./sync.sh
else
$MAKE -C ../ clean && \
$MAKE -C ../ && \
$MAKE -C ../ test && \
$MAKE -C ../ install &&
sudo -E PATH="$PATH" ./build-image-qemu.sh
./sync.sh
fi