diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/PkgConfig.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/PkgConfig.cpp b/src/PkgConfig.cpp index 42d0d13..3a36f39 100644 --- a/src/PkgConfig.cpp +++ b/src/PkgConfig.cpp @@ -6,7 +6,7 @@ using namespace std; // TODO: Do not use pkg-config program. The same functionality can easily be achieved -// by reading files in /usr/bin/pkgconfig +// by reading files in /usr/share/pkgconfig // Or is there no downside to calling pkg-config program? namespace sibs { diff --git a/src/main.cpp b/src/main.cpp index 12d3bc4..38e68f0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -182,7 +182,7 @@ void usageInit() printf(" --dynamic\t\t\tProject compiles to a dynamic library\n"); printf(" --lang\t\t\tProject template language - Optional (default: c++)\n"); printf("Examples:\n"); - printf(" sibs init --exec\n"); + printf(" sibs init . --exec\n"); printf(" sibs init dirA/dirB --dynamic"); exit(1); } @@ -226,6 +226,14 @@ bool isPathSubPathOf(const FileString &path, const FileString &subPathOf) return _tinydir_strncmp(path.c_str(), subPathOf.c_str(), subPathOf.size()) == 0; } +static bool doesProgramExist(const _tinydir_char_t *programName) +{ + FileString cmd = FileString(programName) + TINYDIR_STRING(" --version"); + Result<sibs::ExecResult> result = exec(cmd.c_str()); + bool programNotFound = !result && result.getErrorCode() == 127; + return !programNotFound; +} + int buildProject(const FileString &projectPath, const FileString &projectConfFilePath, SibsConfig &sibsConfig) { FileString buildPath; |