Skip to content

Commit

Permalink
Account for non-existent 'build' dir in build_product
Browse files Browse the repository at this point in the history
In some cases, especially when built as an RPM, the empty 'build'
directory may disappear, causing './build_product' to fail on

  ./build_product: line 395: cd: build: No such file or directory

Since we're already removing its content, just remove it completely
and re-create it from scratch. The '-f' of 'rm' causes it to
silently ignore non-existent 'build'.

Signed-off-by: Jiri Jaburek <comps@nomail.dom>
  • Loading branch information
comps committed Feb 19, 2024
1 parent 087d023 commit b79d5a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build_product
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ fi


set -e
rm -rf build/*
rm -rf build
mkdir build
cd build
cmake .. "${CMAKE_OPTIONS[@]}"
$build_command "-j${jobs}" "${EXPLICIT_BUILD_TARGETS[@]}"
Expand Down

0 comments on commit b79d5a4

Please sign in to comment.