devtools/lib
Tobias Powalowski 0365edb264
fix: enable extglob before func definition for bash-5.2 compatibility
The `extglob` option changes the behavior of the shell parser, since
extended glob patterns would otherwise be syntax errors. bash-5.2
changed the way a function definition is processed by calling the parser
instead of relying on the ad-hoc code in bash-5.1 and earlier versions.
This means, in bash-5.2 the shell function was parsed without `extglob`
being enabled because the `shopt` command to enable it was part of the
function body.

Add `shopt` options for `extglob` around function definitions to address
this issue and allow bash-5.2 to correctly parse the function.

Co-authored-by: Frédéric Pierret (fepitre) <frederic.pierret@qubes-os.org>
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2023-03-06 21:51:27 +01:00
..
archroot.sh Add GPL-3.0-or-later SPDX identifier to all scripts 2021-10-29 09:16:13 +02:00
common.sh fix: enable extglob before func definition for bash-5.2 compatibility 2023-03-06 21:51:27 +01:00
valid-repos.sh Add GPL-3.0-or-later SPDX identifier to all scripts 2021-10-29 09:16:13 +02:00
valid-tags.sh Add GPL-3.0-or-later SPDX identifier to all scripts 2021-10-29 09:16:13 +02:00