diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2024-04-26 12:01:05 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-04-26 08:12:15 +0200 |
commit | 9833a346d422acdfcd5a2a68cd184a884e33c025 (patch) | |
tree | ddcaccd3a10b33ecdc31ee603b783793fb17a653 | |
parent | 8c0bccc91f8c44de2c6b01ef056142d567df6ad5 (diff) | |
download | mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.tar mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.tar.gz mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.tar.bz2 mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.tar.lz mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.tar.xz mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.tar.zst mbuto-9833a346d422acdfcd5a2a68cd184a884e33c025.zip |
${wd} is always set, no need to test for it
We unconditionally set ${wd} to a temporary directory, but there are some
places where we test if it is empty. This appears to be stale code from
some earlier version, so simply remove it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | mbuto | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -369,7 +369,7 @@ cmd_check() { # cleanup() - Remove left-overs on exit, used from trap cleanup() { [ -n "${ARCHIVEMOUNT}" ] && "${UMOUNT}" "${wd}" 2>/dev/null - [ -n "${wd}" ] && "${RM}" -rf "${wd}" + "${RM}" -rf "${wd}" [ -n "${pkg_tmp}" ] && "${RM}" -f "${pkg_tmp}" [ -n "${compress_test1}" ] && "${RM}" -f "${compress_test1}" [ -n "${compress_test2}" ] && "${RM}" -f "${compress_test2}" @@ -1044,7 +1044,6 @@ build() { # add() - Add contents to existing image # $1: Item to be added add() { - [ -z "${wd}" ] && cpio_init kmod_init [ -e "${1}" ] && __path="${1}" || __path=$(command -v "${1}") || : |