Skip to content

Commit 674619c

Browse files
fix default by checking existence of build folders
Signed-off-by: Patrick Bergeron <[email protected]>
1 parent ad7e3e6 commit 674619c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

rvcmds.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,14 @@ echo "Call 'rvbootstrap' if its your first time building or after calling rvclea
280280
echo "After 'rvbootstrap', use 'rvbuild' or 'rvmk' for incremental builds."
281281
echo
282282

283-
# Initialize with appropriate build mode (after sourcing, if we were in debug, stay in debug)
283+
# Initialize with appropriate build mode
284284
if [ "$INIT_BUILD_TYPE" = "Debug" ]; then
285285
rvdebug
286286
else
287-
rvrelease
287+
# Check for existing build directories to determine best default
288+
if [ -d "${RV_HOME}/_build_debug" ] && [ ! -d "${RV_HOME}/_build" ]; then
289+
rvdebug
290+
else
291+
rvrelease
292+
fi
288293
fi

0 commit comments

Comments
 (0)