From 2ffe0298da68be299bde6cf8a0b1201c7fa1372e Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 13 Jul 2024 08:47:29 +0900 Subject: [PATCH] DEVELOPER_TOOLBOX: added a check to warn the user about sudo [skip ci] --- developer_toolbox/build_retrodeck_locally.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/developer_toolbox/build_retrodeck_locally.sh b/developer_toolbox/build_retrodeck_locally.sh index a5bbe028..b7b53a63 100755 --- a/developer_toolbox/build_retrodeck_locally.sh +++ b/developer_toolbox/build_retrodeck_locally.sh @@ -2,10 +2,18 @@ # 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 export GITHUB_WORKSPACE="." -export $disable_rofiles_fuse="--disable-rofiles-fuse" # Initialize the Flatpak repo ostree init --mode=archive-z2 --repo=${GITHUB_WORKSPACE}/retrodeck-repo