wip fix some issues
This commit is contained in:
@@ -4,7 +4,6 @@ namespace rename_ue_project
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
const string OLD_PROJECT_NAME = "MotionMatching";
|
||||
const string UE_PROJECT_EXTENSION = ".uproject";
|
||||
const string GITIGNORE = ".gitignore";
|
||||
const string README = "READ.ME";
|
||||
@@ -25,11 +24,24 @@ namespace rename_ue_project
|
||||
/// <exception cref="ArgumentException">if an app parameter was invalid</exception>
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
if (args.Length < 1) {
|
||||
throw new ArgumentException("Please provide the absolute root path to your unreal project");
|
||||
}
|
||||
var projectPath = args[0];
|
||||
|
||||
if (args.Length < 2) {
|
||||
throw new ArgumentException("Please provide the new project name");
|
||||
}
|
||||
var projectName = args[1];
|
||||
|
||||
if (args.Length < 3) {
|
||||
throw new ArgumentException("Please provide a description for your READ.ME (as markdown)");
|
||||
}
|
||||
var descLong = args[2];
|
||||
|
||||
|
||||
|
||||
|
||||
if (!Directory.Exists(projectPath))
|
||||
{
|
||||
throw new IOException($"Directory {projectPath} does not exist");
|
||||
@@ -44,6 +56,8 @@ namespace rename_ue_project
|
||||
}
|
||||
|
||||
// step 1: rename directory
|
||||
// todo: find the .uproject file. in case there is more than one, throw an exception
|
||||
|
||||
if (!Directory.Exists(OLD_PROJECT_NAME))
|
||||
{
|
||||
throw new IOException($"Directory {OLD_PROJECT_NAME} does not exist");
|
||||
|
||||
Reference in New Issue
Block a user