Skip to content

Commit 6f5832f

Browse files
author
Yutaro-B18016
committed
Ask for sudo if not running as root [Arch Linux]
1 parent 58e4894 commit 6f5832f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/install-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#
88

99
if [ "$(id -u)" -ne 0 ]; then
10-
echo 'This script must be run with root privileges' >&2
11-
exit 1
10+
#rerun the script with root privileges
11+
exec sudo "$0" "$@"
1212
fi
1313

1414
# Use Qi to check for exact package name

0 commit comments

Comments
 (0)