diff options
author | Christian Hesse <mail@eworm.de> | 2024-05-27 18:37:18 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-05-29 09:23:49 +0200 |
commit | c46764a5f6f7aa4f09bab4a38305ae4e39d65bb8 (patch) | |
tree | ee37b1b23876c86d73d85a13b944326710f459dc | |
parent | e97adc401a0b6478b29796ab53b447cb234b32ad (diff) | |
download | pacman-offline-c46764a5f6f7aa4f09bab4a38305ae4e39d65bb8.tar.gz pacman-offline-c46764a5f6f7aa4f09bab4a38305ae4e39d65bb8.tar.zst |
check for privileges before preparing
-rwxr-xr-x | bin/pacman-offline | 5 |
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 |