ignore hash sign comments

This commit is contained in:
DrMaxNix 2024-05-31 18:33:51 +02:00
parent 3af0df917a
commit e9d125bd03

View File

@ -12,7 +12,7 @@ ini_parse(){
eval $(gawk -F= '{ eval $(gawk -F= '{
if($1 ~ /^\[/) if($1 ~ /^\[/)
section=tolower(gensub(/\[(.+)\]/,"\\1",1,$1)) section=tolower(gensub(/\[(.+)\]/,"\\1",1,$1))
else if($1 !~ /^$/ && $1 !~ /^;/){ else if($1 !~ /^$/ && $1 !~ /^;/ && $1 !~ /^#/){
gsub(/^[ \t]+|[ \t]+$/, "", $1); gsub(/^[ \t]+|[ \t]+$/, "", $1);
gsub(/[\[\]]/, "", $1); gsub(/[\[\]]/, "", $1);
gsub(/^[ \t]+|[ \t]+$/, "", $2); gsub(/^[ \t]+|[ \t]+$/, "", $2);