cleanup: add verbose mode for cleanup-pkgs scripts

This commit is contained in:
Anton Midyukov 2022-02-16 09:59:26 +07:00
parent 0e7eb96761
commit f09ef54e65
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,10 @@
#!/bin/sh -efu
# remove temporary packages from the installed system
if [ -n "$GLOBAL_VERBOSE" ]; then
echo "** GLOBAL_CLEANUP_PACKAGES: $GLOBAL_CLEANUP_PACKAGES"
fi >&2
[ -n "$GLOBAL_CLEANUP_PACKAGES" ] || exit 0
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"

View File

@ -1,6 +1,10 @@
#!/bin/sh -efu
# remove extra packages from a bare livecd
if [ -n "$GLOBAL_VERBOSE" ]; then
echo "** GLOBAL_CLEANUP_PACKAGES: $GLOBAL_CLEANUP_PACKAGES"
fi >&2
[ -n "$GLOBAL_CLEANUP_PACKAGES" ] || exit 0
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y -- $list