common: correctly unset build_option_* variables

We can use the bash feature ${!prefix@}/${!prefix*} which expands to
all variables with the prefix.
This avoids leaking build_options between sourced templates.
This commit is contained in:
Duncaen 2022-07-05 17:13:37 +02:00
parent 4d457bf911
commit 11c93a1e79
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35
1 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,9 @@ unset -v CFLAGS CXXFLAGS FFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH
unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF PKG_CONFIG
unset -v CMAKE_GENERATOR
# unset all $build_option_ variables
unset -v "${!build_option_@}"
# hooks/do-extract/00-distfiles
unset -v skip_extraction