Add '-y' flag for hecl

This commit is contained in:
Jack Andersen 2016-03-23 16:51:57 -10:00
parent 51d4caf252
commit d35408376c
4 changed files with 31 additions and 25 deletions

View File

@ -26,6 +26,7 @@ struct ToolPassInfo
hecl::Database::Project* project = nullptr;
unsigned verbosityLevel = 0;
bool force = false;
bool yes = false;
};
class ToolBase

View File

@ -151,6 +151,8 @@ public:
hecl::Printf(_S("\n"));
}
if (!m_info.yes)
{
if (XTERM_COLOR)
hecl::Printf(_S("\n" BLUE BOLD "Continue?" NORMAL " (Y/n) "));
else
@ -176,6 +178,7 @@ public:
#ifndef _WIN32
tcsetattr(0, TCSANOW, &tioOld);
#endif
}
hecl::Printf(_S("\n"));

View File

@ -201,6 +201,8 @@ int main(int argc, const char** argv)
++info.verbosityLevel;
else if (*chit == _S('f'))
info.force = true;
else if (*chit == _S('y'))
info.yes = true;
else
info.flags.push_back(*chit);
}

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 1eb46301c0e56cf33df173396029841c960e42fd
Subproject commit ca38805776c814034af28f68144de64868601da1