Skip to content

Commit f01be40

Browse files
committed
Change name convention for output files
1 parent 5461571 commit f01be40

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

PoExtractor/Program.cs

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ static void Main(string[] args) {
1818
}
1919

2020
string[] projectFiles;
21-
if (args[0].EndsWith(".csproj")) {
22-
projectFiles = new string[] { args[0] };
23-
} else if (Directory.Exists(args[0])) {
21+
if (Directory.Exists(args[0])) {
2422
projectFiles = Directory.EnumerateFiles(args[0], "*.csproj", SearchOption.AllDirectories).ToArray();
2523
} else {
2624
WriteHelp();
@@ -32,15 +30,15 @@ static void Main(string[] args) {
3230
foreach (var projectFilePath in projectFiles) {
3331
var projectPath = Path.GetDirectoryName(projectFilePath);
3432
var basePath = Path.GetDirectoryName(projectPath) + Path.DirectorySeparatorChar;
35-
var outputPath = Path.Combine(outputBasePath, projectPath.TrimStart(basePath), "OrchardCore.pot");
33+
var outputPath = Path.Combine(outputBasePath, projectPath.TrimStart(basePath) + ".pot");
3634

3735
ProcessProject(projectPath, basePath, outputPath);
3836
}
3937
}
4038

4139
private static void WriteHelp() {
4240
Console.WriteLine("Usage: PoExtractor.exe input output");
43-
Console.WriteLine(" input: Path to a .cproj file to proccess single project or a path to prcess all project in the specified path");
41+
Console.WriteLine(" input: Path to input directory, all projects at the the path will be processed");
4442
Console.WriteLine(" output: Path to a directory where POT files will be generated");
4543
}
4644

0 commit comments

Comments
 (0)