mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 10:27:42 +00:00
Implement -o flag for extracting
This commit is contained in:
@@ -34,6 +34,10 @@ public:
|
|||||||
LogModule.report(logvisor::Fatal, "hecl extract needs a source path as its first argument");
|
LogModule.report(logvisor::Fatal, "hecl extract needs a source path as its first argument");
|
||||||
|
|
||||||
if (!info.project)
|
if (!info.project)
|
||||||
|
{
|
||||||
|
hecl::SystemString rootDir;
|
||||||
|
|
||||||
|
if (info.output.empty())
|
||||||
{
|
{
|
||||||
/* Get name from input file and init project there */
|
/* Get name from input file and init project there */
|
||||||
hecl::SystemString baseFile = info.args.front();
|
hecl::SystemString baseFile = info.args.front();
|
||||||
@@ -49,8 +53,17 @@ public:
|
|||||||
if (baseFile.empty())
|
if (baseFile.empty())
|
||||||
LogModule.report(logvisor::Fatal, "hecl extract must be ran within a project directory");
|
LogModule.report(logvisor::Fatal, "hecl extract must be ran within a project directory");
|
||||||
|
|
||||||
|
rootDir = info.cwd + baseFile;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (hecl::PathRelative(info.output.c_str()))
|
||||||
|
rootDir = info.cwd + info.output;
|
||||||
|
else
|
||||||
|
rootDir = info.output;
|
||||||
|
}
|
||||||
|
|
||||||
size_t ErrorRef = logvisor::ErrorCount;
|
size_t ErrorRef = logvisor::ErrorCount;
|
||||||
hecl::SystemString rootDir = info.cwd + baseFile;
|
|
||||||
hecl::ProjectRootPath newProjRoot(rootDir);
|
hecl::ProjectRootPath newProjRoot(rootDir);
|
||||||
newProjRoot.makeDir();
|
newProjRoot.makeDir();
|
||||||
m_fallbackProj.reset(new hecl::Database::Project(newProjRoot));
|
m_fallbackProj.reset(new hecl::Database::Project(newProjRoot));
|
||||||
|
|||||||
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: 87f213bc0b...ec49377fcd
Reference in New Issue
Block a user