summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-06-25 11:43:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-06-25 11:43:50 +0200
commit3360d2f6e8021323f11670498c878de87ab77f4b (patch)
treebb8c9b5babb4cfc6ccdf7ac16566c5a42cc80660
parent484dfefb98bb49cc2197ae1a2f19d49c46654558 (diff)
downloadpacman-offline-3360d2f6e8021323f11670498c878de87ab77f4b.tar.gz
pacman-offline-3360d2f6e8021323f11670498c878de87ab77f4b.tar.zst
only clean if clean method set to keep current
-rwxr-xr-xbin/pacman-offline6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/pacman-offline b/bin/pacman-offline
index 1573eb8..3c7f3d3 100755
--- a/bin/pacman-offline
+++ b/bin/pacman-offline
@@ -20,7 +20,11 @@ TIMER=0
while getopts 'cfhrty' opt; do
case ${opt} in
c)
- CLEAN=1
+ if pacconf 'CleanMethod' | grep -q 'KeepCurrent'; then
+ CLEAN=1
+ else
+ echo 'The clean method is not set to keep current. Not cleaning.' >&2
+ fi
;;
f)
rm -f /system-update