summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-05-27 18:37:18 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-05-29 09:23:49 +0200
commitc46764a5f6f7aa4f09bab4a38305ae4e39d65bb8 (patch)
treeee37b1b23876c86d73d85a13b944326710f459dc /bin
parente97adc401a0b6478b29796ab53b447cb234b32ad (diff)
downloadpacman-offline-c46764a5f6f7aa4f09bab4a38305ae4e39d65bb8.tar.gz
pacman-offline-c46764a5f6f7aa4f09bab4a38305ae4e39d65bb8.tar.zst
check for privileges before preparing
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 ae657fb..fbb9526 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -33,6 +33,11 @@ while getopts 'cfhrty' opt; do
esac
done
+if [ "${UID}" -ne 0 ]; then
+ echo "You need elevated privileges. Please run as user 'root'!" >&2
+ exit 1
+fi
+
OPTIND=1
while getopts 'cfhrty' opt; do
case ${opt} in