catalyst-auto: allow skipping cleaning with CLST_AUTO_NOCLEAN var

Signed-off-by: Ben Kohler <bkohler@gentoo.org>
This commit is contained in:
Ben Kohler 2024-03-19 11:13:35 -05:00
parent 84e4b0bde3
commit bd05aec8be
No known key found for this signature in database
GPG key ID: 7A85BDA4D57605C7

View file

@ -542,6 +542,9 @@ run_catalyst_commands() {
for i in ${!specs_var} ${!optional_specs_var}; do for i in ${!specs_var} ${!optional_specs_var}; do
LOGFILE="${TMPDIR}/log/$(echo "${i}" | sed -e 's:/:_:' -e 's:\.spec$::')_purge.log" LOGFILE="${TMPDIR}/log/$(echo "${i}" | sed -e 's:/:_:' -e 's:\.spec$::')_purge.log"
specpath=$(readlink -f "${i}") specpath=$(readlink -f "${i}")
# Bail out of cleaning (eg) stage3-openrc.spec failure if
# CLST_AUTO_NOCLEAN="stage3-openrc.spec" is set
[[ ${CLST_AUTO_NOCLEAN} == *${i}* ]] ||
run_cmd "${LOGFILE}" "${timeprefix[@]}" catalyst --purgetmponly -c "${CATALYST_CONFIG}" -f "${specpath}" run_cmd "${LOGFILE}" "${timeprefix[@]}" catalyst --purgetmponly -c "${CATALYST_CONFIG}" -f "${specpath}"
done done
update_symlinks update_symlinks