Allow lowercase'd variables in porgrc (like 'include')
git-svn-id: https://svn.code.sf.net/p/porg/code/trunk@158 8854956c-c02d-4db9-8198-7e99b8e08f37
This commit is contained in:
parent
3f376e8ccc
commit
10581bb4dd
|
@ -7,6 +7,7 @@ SVN
|
||||||
installation). Experimental. Please report any error.
|
installation). Experimental. Please report any error.
|
||||||
+ Removed /mnt, /media and /cdrom from the default EXCLUDE (thanks
|
+ Removed /mnt, /media and /cdrom from the default EXCLUDE (thanks
|
||||||
Tomoaki Nishiyama).
|
Tomoaki Nishiyama).
|
||||||
|
+ Allow lowercase'd variables in porgrc (like 'include').
|
||||||
|
|
||||||
|
|
||||||
Version 0.8 (13 April 2015)
|
Version 0.8 (13 April 2015)
|
||||||
|
|
|
@ -30,7 +30,7 @@ BaseOpt::BaseOpt()
|
||||||
if (!porgrc)
|
if (!porgrc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Rexp re("^([A-Z_]+)=(.*)$");
|
Rexp re("^([a-z_]+)=(.*)$", REG_ICASE);
|
||||||
|
|
||||||
for (string buf, opt, val; getline(porgrc, buf); ) {
|
for (string buf, opt, val; getline(porgrc, buf); ) {
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ BaseOpt::BaseOpt()
|
||||||
opt = re.match(1);
|
opt = re.match(1);
|
||||||
val = re.match(2);
|
val = re.match(2);
|
||||||
|
|
||||||
if (opt == "LOGDIR")
|
if (opt == "logdir")
|
||||||
s_logdir = sh_expand(val);
|
s_logdir = sh_expand(val);
|
||||||
else if (opt == "INCLUDE")
|
else if (opt == "include")
|
||||||
s_include = val;
|
s_include = val;
|
||||||
else if (opt == "EXCLUDE")
|
else if (opt == "exclude")
|
||||||
s_exclude = val;
|
s_exclude = val;
|
||||||
else if (opt == "REMOVE_SKIP")
|
else if (opt == "remove_skip")
|
||||||
s_remove_skip = val;
|
s_remove_skip = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue