From 9833a346d422acdfcd5a2a68cd184a884e33c025 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 26 Apr 2024 12:01:05 +1000 Subject: ${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 Signed-off-by: Stefano Brivio --- mbuto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mbuto b/mbuto index 0609e7e..a6f80ab 100755 --- a/mbuto +++ b/mbuto @@ -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}") || : -- cgit v1.2.3