Commit fa56731d authored by Michael Shigorin's avatar Michael Shigorin

cleanup: handle empty variable (ouch!)

This script was completely careless regarding the chance to meet an empty variable resulting in plain "rpm -qa" and subsequent attempt to, well, remove *all* packages. Thanks zerg@ for being persistent this time, even if he could probably find the culprit and send in this patch. :)
parent 03bb07b4
#!/bin/sh -efu
# remove extra packages from a bare livecd
[ -n "$GLOBAL_CLEANUP_PACKAGES" ] || exit 0
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y -- $list
:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment