Skip to content

Commit 2fb5ee6

Browse files
committed
platform: remove previous build options if file is missing
"touch" would create the file if not present, but not delete its contents if a previous run left the file in the build dir.
1 parent de8ec9d commit 2fb5ee6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ recipe.hooks.prebuild.4.pattern.windows=cmd /c IF EXIST "{build.source.path}\boo
136136

137137
# Check if custom build options exist in the sketch folder
138138
recipe.hooks.prebuild.5.pattern=bash -c "[ ! -f "{build.source.path}"/build_opt.h ] || cp -f "{build.source.path}"/build_opt.h "{build.path}"/build_opt.h"
139-
recipe.hooks.prebuild.6.pattern=bash -c "[ -f "{build.path}"/build_opt.h ] || touch "{build.path}"/build_opt.h"
139+
recipe.hooks.prebuild.6.pattern=bash -c "[ -f "{build.path}"/build_opt.h ] || : > "{build.path}"/build_opt.h"
140140

141141
recipe.hooks.prebuild.5.pattern.windows=cmd /c if exist "{build.source.path}\build_opt.h" COPY /y "{build.source.path}\build_opt.h" "{build.path}\build_opt.h"
142142
recipe.hooks.prebuild.6.pattern.windows=cmd /c if not exist "{build.path}\build_opt.h" type nul > "{build.path}\build_opt.h"

0 commit comments

Comments
 (0)