Match only the first ; priority=[0-9] line in the ini file
This commit is contained in:
parent
826b4aadce
commit
4e366d83e7
|
@ -124,7 +124,7 @@ get_priority() {
|
||||||
module_exists "$version" "$modname" || module_ret=$?
|
module_exists "$version" "$modname" || module_ret=$?
|
||||||
|
|
||||||
if [ "$module_ret" -eq 0 ]; then
|
if [ "$module_ret" -eq 0 ]; then
|
||||||
priority=$(sed -ne "s/^; \?priority=\([0-9]\+\)$/\\1/p" "$source_ini")
|
priority=$(sed -ne "s/^; \?priority=\([0-9]\+\)$/\\1/p; /[0-9]\+/q" "$source_ini")
|
||||||
[ -z "$priority" ] && priority=20
|
[ -z "$priority" ] && priority=20
|
||||||
echo "$priority"
|
echo "$priority"
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue