mirror of
https://github.com/GreemDev/Ryujinx
synced 2025-02-01 01:58:54 +01:00
simplify
This commit is contained in:
parent
d9f2b813a0
commit
f976c3c362
2 changed files with 14 additions and 5 deletions
|
@ -11,6 +11,8 @@ namespace Ryujinx.BuildValidationTasks
|
||||||
{
|
{
|
||||||
public static bool Execute(string projectPath)
|
public static bool Execute(string projectPath)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Running Locale Validation Task...");
|
||||||
|
|
||||||
string path = projectPath + "src/Ryujinx/Assets/locales.json";
|
string path = projectPath + "src/Ryujinx/Assets/locales.json";
|
||||||
string data;
|
string data;
|
||||||
|
|
||||||
|
@ -91,6 +93,8 @@ namespace Ryujinx.BuildValidationTasks
|
||||||
sw.Write(jsonString);
|
sw.Write(jsonString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Finished Locale Validation Task!");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,16 +19,21 @@ namespace Ryujinx.BuildValidationTasks
|
||||||
else
|
else
|
||||||
throw new ArgumentException("Error: too many arguments!");
|
throw new ArgumentException("Error: too many arguments!");
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(args[0]))
|
|
||||||
|
string path = args[0];
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
throw new ArgumentException("Error: path is null or empty!");
|
throw new ArgumentException("Error: path is null or empty!");
|
||||||
|
|
||||||
if (!Path.Exists(args[0]))
|
if (!Path.Exists(args[0]))
|
||||||
throw new ArgumentException($"path {{{args[0]}}} does not exist!");
|
throw new ArgumentException($"path {{{path}}} does not exist!");
|
||||||
|
|
||||||
if (!Directory.GetDirectories(Path.GetFullPath(args[0])).Contains($"{Path.GetFullPath(args[0])}src"))
|
path = Path.GetFullPath(path);
|
||||||
throw new ArgumentException($"path {{{args[0]}}} is not a valid ryujinx project!");
|
|
||||||
|
|
||||||
LocalesValidationTask.Execute(Path.GetFullPath(args[0]));
|
if (!Directory.GetDirectories(path).Contains($"{path}src"))
|
||||||
|
throw new ArgumentException($"path {{{path}}} is not a valid ryujinx project!");
|
||||||
|
|
||||||
|
LocalesValidationTask.Execute(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue