From 3360d2f6e8021323f11670498c878de87ab77f4b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 25 Jun 2023 11:43:50 +0200 Subject: only clean if clean method set to keep current --- bin/pacman-offline | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2