Skip to content

Commit

Permalink
scripts/Windows/build-mingw-prereqs.sh: avoid use of "true" program [n…
Browse files Browse the repository at this point in the history
…etworkupstools#1491]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jan 20, 2025
1 parent 04dc449 commit 71d9d08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/Windows/build-mingw-prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#
# NOTE: Currently constrained to providing net-snmp under MSYS2.
# We can not rely on certain common shell facilities like `true`
# and `false` programs being available (in PATH or at all).
# and `false` programs being available (in PATH or at all) so we
# `echo ""` instead.
# TODO: Support `make uninstall` attempts for older versions?..

prepareEnv() {
Expand Down Expand Up @@ -211,14 +212,14 @@ provide_libmodbus_git() (
echo "Current content in '`pwd`' matches current '${DEP_VERSION}' in '${DEP_GITREPO}'" >&2
fi
fi
} || { chmod -R +w "${DEP_DIRNAME}" || true ; rm -rf "${DEP_DIRNAME}" ; }
} || { chmod -R +w "${DEP_DIRNAME}" || echo "" ; rm -rf "${DEP_DIRNAME}" ; }
fi

cd "${DLDIR}"
if [ ! -d "${DEP_DIRNAME}/.git" ] ; then
echo "FETCH: Clone git workspace in '${DLDIR}/${DEP_DIRNAME}' from '${DEP_VERSION}' in '${DEP_GITREPO}'..." >&2
FORCE=true
chmod -R +w "${DEP_DIRNAME}" || true
chmod -R +w "${DEP_DIRNAME}" || echo ""
rm -rf "${DEP_DIRNAME}"
git clone "${DEP_GITREPO}" -b "${DEP_VERSION}" "${DEP_DIRNAME}" || exit
fi
Expand Down

0 comments on commit 71d9d08

Please sign in to comment.