aboutgitcode
diff options
context:
space:
mode:
-rwxr-xr-xmbuto7
1 files changed, 4 insertions, 3 deletions
diff --git a/mbuto b/mbuto
index 0003262..4f27242 100755
--- a/mbuto
+++ b/mbuto
@@ -394,7 +394,6 @@ workers() {
# cpio_init() - Source existing CPIO archive, or create if needed
# $1: Path to CPIO archive, might exist, might be discarded if existing
cpio_init() {
- wd="$("${MKTEMP}" -d)"
if [ -f "${OUT}" ] && [ "${1}" != "discard" ]; then
info "Sourcing CPIO archive from ${OUT}"
@@ -566,7 +565,7 @@ libs_copy() {
[ "$("${BASENAME}" "${__path}")" = "libfakeroot-sysv.so" ] && \
continue
- __destpath="${wd}/${__path}"
+ __destpath="${wd}${__path}"
[ -f "${__destpath}" ] && continue
__destdir="$("${DIRNAME}" "${__destpath}")"
@@ -918,7 +917,6 @@ stats() {
# cmds() - Loop over non-option arguments if any, just build image otherwise
# $@: Command arguments
cmds() {
- wd=
{ [ ! -f "${OUT}" ] || [ -z "${1}" ]; } && build
for arg do
@@ -1050,6 +1048,9 @@ for __l in ${TOOLS}; do
cmd_check "${__l}"
done
+# Create working directory
+wd="$("${MKTEMP}" -d)"
+
# Apply profile requested via -p, if any, from matching profile_*() function
if [ -n "${PROFILE}" ]; then
notice "Applying profile ${PROFILE}"