summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pacman-offline5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index fbb9526..a8474e2 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -34,6 +34,11 @@ while getopts 'cfhrty' opt; do
done
if [ "${UID}" -ne 0 ]; then
+ if command -v run0 >/dev/null; then
+ echo 'Missing privileges, trying to elevate.' >&2
+ exec run0 "${0}" "${@}"
+ fi
+
echo "You need elevated privileges. Please run as user 'root'!" >&2
exit 1
fi