DEVELOPER_TOOLBOX: added a check to warn the user about sudo [skip ci]

This commit is contained in:
XargonWan 2024-07-13 08:47:29 +09:00
parent 9eacd5fab3
commit 2ffe0298da

View file

@ -2,10 +2,18 @@
# WARNING: run this script from the project root folder, not from here!! # WARNING: run this script from the project root folder, not from here!!
# Check if script is running with elevated privileges
if [ "$EUID" -ne 0 ]; then
echo "The build might fail without some superuser permissions, please run me with sudo. Continue without sudo? [y/N,]"
read -r continue_without_sudo
if [[ "$continue_without_sudo" != "y" ]]; then
exit 1
fi
fi
git submodule update --init --recursive git submodule update --init --recursive
export GITHUB_WORKSPACE="." export GITHUB_WORKSPACE="."
export $disable_rofiles_fuse="--disable-rofiles-fuse"
# Initialize the Flatpak repo # Initialize the Flatpak repo
ostree init --mode=archive-z2 --repo=${GITHUB_WORKSPACE}/retrodeck-repo ostree init --mode=archive-z2 --repo=${GITHUB_WORKSPACE}/retrodeck-repo