Skip to content

patch_lines is not useful for adding multiple lines #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gilesknap opened this issue Apr 5, 2025 · 1 comment
Open

patch_lines is not useful for adding multiple lines #95

gilesknap opened this issue Apr 5, 2025 · 1 comment

Comments

@gilesknap
Copy link
Member

We should also have an insert block feature for things like this:

patch_lines:
- path: "{{ config_linux_host }}"
regexp: AREA_DETECTOR[\s\S]*WITH_BOOST
line: |
AREA_DETECTOR=$(SUPPORT)
CROSS_COMPILER_TARGET_ARCHS =
WITH_GRAPHICSMAGICK = NO
WITH_HDF5 = YES
HDF5_EXTERNAL = YES
HDF5_LIB = /usr/lib/x86_64-linux-gnu/hdf5/serial/
HDF5_INCLUDE = /usr/include/hdf5/serial/
WITH_SZIP = YES
SZIP_EXTERNAL = YES
WITH_JPEG = YES
JPEG_EXTERNAL = YES
WITH_TIFF = YES
TIFF_EXTERNAL = YES
XML2_EXTERNAL = YES
XML2_INCLUDE = /usr/include/libxml2/
WITH_ZLIB = YES
ZLIB_EXTERNAL = YES
WITH_BLOSC = YES
BLOSC_EXTERNAL = YES
WITH_PVA = YES
WITH_BOOST = NO
WITH_NETCDF = YES
NETCDF_EXTERNAL = YES

@gilesknap
Copy link
Member Author

The regexp does not work in the above and it adds a second block on second invocation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant