From 6f5832fd81ed918a50940650f3d52bb93f608e9d Mon Sep 17 00:00:00 2001 From: Yutaro-B18016 Date: Fri, 19 Feb 2021 19:57:59 +0900 Subject: [PATCH] Ask for sudo if not running as root [Arch Linux] --- arch/install-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/install-config.sh b/arch/install-config.sh index 0f634d7..0942654 100755 --- a/arch/install-config.sh +++ b/arch/install-config.sh @@ -7,8 +7,8 @@ # if [ "$(id -u)" -ne 0 ]; then - echo 'This script must be run with root privileges' >&2 - exit 1 + #rerun the script with root privileges + exec sudo "$0" "$@" fi # Use Qi to check for exact package name