Skip to content

Commit d77c012

Browse files
committed
Changed code to clean build to position after isolated setup.
Signed-off-by: kilo52 <[email protected]>
1 parent b665923 commit d77c012

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

r/02_library_native_rcpp/source/build.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ for arg in "$@"; do
3535
case $arg in
3636
--clean)
3737
ARG_CLEAN=true;
38+
${{VAR_SCRIPT_BUILD_ISOLATED_ARGARRAY_ADD}}
3839
shift
3940
;;
4041
--docs)
@@ -76,16 +77,6 @@ if ! source ".global.sh"; then
7677
exit 1;
7778
fi
7879

79-
# Check clean flag
80-
if [[ $ARG_CLEAN == true ]]; then
81-
if [ -d "build" ]; then
82-
rm -rf "build";
83-
fi
84-
# Remove compiled files
85-
run_R_cmd "clean_dll()";
86-
exit 0;
87-
fi
88-
8980
if ! [ -d "build" ]; then
9081
mkdir "build";
9182
fi
@@ -110,6 +101,16 @@ function build_docs() {
110101
return 0;
111102
}
112103

104+
# Check clean flag
105+
if [[ $ARG_CLEAN == true ]]; then
106+
if [ -d "build" ]; then
107+
rm -rf "build";
108+
fi
109+
# Remove compiled files
110+
run_R_cmd "clean_dll()";
111+
exit 0;
112+
fi
113+
113114
# Generate code bindings with Rcpp
114115
logI "Generating C++ bindings";
115116
run_R_cmd "compileAttributes()";

0 commit comments

Comments
 (0)