Merge pull request #1176 from yalh76/ynh_add_config

Make grep lazy
This commit is contained in:
Alexandre Aubin 2021-02-28 15:22:05 +01:00 committed by GitHub
commit 65424cc1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -382,7 +382,7 @@ ynh_replace_vars () {
# Replace others variables # Replace others variables
# List other unique (__ __) variables in $file # List other unique (__ __) variables in $file
local uniques_vars=( $(grep -o '__[A-Z0-9_]*__' $file | sort --unique | sed "s@__\([^.]*\)__@\L\1@g" )) local uniques_vars=( $(grep -oP '__[A-Z0-9_]+?__' $file | sort --unique | sed "s@__\([^.]*\)__@\L\1@g" ))
# Do the replacement # Do the replacement
local delimit=@ local delimit=@