Skip to content

Commit

Permalink
scripts/Windows/build-mingw-prereqs.sh: only chmod/remove builddir if…
Browse files Browse the repository at this point in the history
… it exists before rebuild [networkupstools#1491]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jan 20, 2025
1 parent 64ecec7 commit eafc45b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/Windows/build-mingw-prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,11 @@ provide_libmodbus_git() (
set -e

cd "${WSDIR}"
# Take care of read-only destdir pieces
chmod -R +w "./${DEP_DIRNAME}" || echo ""
rm -rf "./${DEP_DIRNAME}" || echo ""
if [ -e "./${DEP_DIRNAME}" ] ; then
# Take care of read-only destdir pieces
chmod -R +w "./${DEP_DIRNAME}" || echo ""
rm -rf "./${DEP_DIRNAME}" || echo ""
fi
mkdir -p "./${DEP_DIRNAME}" || exit
cd "./${DEP_DIRNAME}" || exit

Expand Down

0 comments on commit eafc45b

Please sign in to comment.