|
@ -96,9 +96,17 @@ run(Config, FirstFiles, SourceDir, SourceExt, TargetDir, TargetExt, |
|
|
TargetDir :: file:filename(), |
|
|
TargetDir :: file:filename(), |
|
|
SourceExt :: string(), |
|
|
SourceExt :: string(), |
|
|
TargetExt :: string(). |
|
|
TargetExt :: string(). |
|
|
run(Config, FirstFiles, SourceDir, SourceExt, TargetDir, TargetExt, |
|
|
|
|
|
|
|
|
run(Config, FirstFiles, SourceDir, SourceExt0, TargetDir, TargetExt, |
|
|
Compile3Fn, Opts) -> |
|
|
Compile3Fn, Opts) -> |
|
|
%% Convert simple extension to proper regex |
|
|
|
|
|
|
|
|
%% Convert simple extension to proper regex. |
|
|
|
|
|
%% If the extension has a leading dot (e.g.: `.peg') |
|
|
|
|
|
%% we escape it. |
|
|
|
|
|
%% Otherwise, if the extension doesn't have a leading dot |
|
|
|
|
|
%% we add it ourselves (e.g.: `peg' -> `.peg') |
|
|
|
|
|
SourceExt = case SourceExt0 of |
|
|
|
|
|
[$.|_Ext] -> SourceExt0; |
|
|
|
|
|
_ -> [$.] ++ SourceExt0 |
|
|
|
|
|
end, |
|
|
SourceExtRe = "^(?!\\._).*\\" ++ SourceExt ++ [$$], |
|
|
SourceExtRe = "^(?!\\._).*\\" ++ SourceExt ++ [$$], |
|
|
|
|
|
|
|
|
Recursive = proplists:get_value(recursive, Opts, true), |
|
|
Recursive = proplists:get_value(recursive, Opts, true), |
|
|