From 10581bb4dd501030d6f704211793f488133c914a Mon Sep 17 00:00:00 2001 From: davidrr Date: Mon, 17 Aug 2015 20:50:31 +0000 Subject: [PATCH] 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 --- ChangeLog | 1 + lib/porg/baseopt.cc | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0db1fc2..25559f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ SVN installation). Experimental. Please report any error. + Removed /mnt, /media and /cdrom from the default EXCLUDE (thanks Tomoaki Nishiyama). + + Allow lowercase'd variables in porgrc (like 'include'). Version 0.8 (13 April 2015) diff --git a/lib/porg/baseopt.cc b/lib/porg/baseopt.cc index 733419e..43bcb6e 100644 --- a/lib/porg/baseopt.cc +++ b/lib/porg/baseopt.cc @@ -30,7 +30,7 @@ BaseOpt::BaseOpt() if (!porgrc) return; - Rexp re("^([A-Z_]+)=(.*)$"); + Rexp re("^([a-z_]+)=(.*)$", REG_ICASE); for (string buf, opt, val; getline(porgrc, buf); ) { @@ -39,13 +39,13 @@ BaseOpt::BaseOpt() opt = re.match(1); val = re.match(2); - if (opt == "LOGDIR") + if (opt == "logdir") s_logdir = sh_expand(val); - else if (opt == "INCLUDE") + else if (opt == "include") s_include = val; - else if (opt == "EXCLUDE") + else if (opt == "exclude") s_exclude = val; - else if (opt == "REMOVE_SKIP") + else if (opt == "remove_skip") s_remove_skip = val; } }