aboutgitcode
diff options
context:
space:
mode:
authorSevinj Aghayeva <sevinj.aghayeva@gmail.com>2022-06-07 20:42:52 -0400
committerStefano Brivio <sbrivio@redhat.com>2022-06-14 15:44:37 +0200
commit7c78f197cc42c38cae2654a02d760e371866b3f4 (patch)
treedd9ca67044027c06f92c7c5f83f1ec84bfd200cf
parentbddfc1da9c9167b862660a2bdd04d39adb1ed0de (diff)
downloadmbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.tar
mbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.tar.gz
mbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.tar.bz2
mbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.tar.lz
mbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.tar.xz
mbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.tar.zst
mbuto-7c78f197cc42c38cae2654a02d760e371866b3f4.zip
mbuto: call cmd_check before option processing
${AWK} is needed when parsing options. Call cmd_check before option processing to make ${AWK} available. Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com>
-rwxr-xr-xmbuto10
1 files changed, 5 insertions, 5 deletions
diff --git a/mbuto b/mbuto
index cd0f5eb..dbe0d5c 100755
--- a/mbuto
+++ b/mbuto
@@ -1195,6 +1195,11 @@ if [ "${LD_PRELOAD}" != "libfakeroot-sysv.so" ] && [ "$(id -u)" -ne 0 ]; then
fi
fi
+# Check needed tools, exit if any is missing
+for __l in ${TOOLS}; do
+ cmd_check "${__l}"
+done
+
# Parse options
while getopts :c:df:k:m:p:s:vh __opt; do
case ${__opt} in
@@ -1221,11 +1226,6 @@ if [ "${__fakeroot_missing}" = "y" ]; then
exit 1
fi
-# Check needed tools, exit if any is missing
-for __l in ${TOOLS}; do
- cmd_check "${__l}"
-done
-
# Create working directory
wd="$("${MKTEMP}" -d)"