diff options
Diffstat (limited to 'tools/src/asset_processor/util.cpp')
| -rw-r--r-- | tools/src/asset_processor/util.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/src/asset_processor/util.cpp b/tools/src/asset_processor/util.cpp new file mode 100644 index 00000000..f6ac050f --- /dev/null +++ b/tools/src/asset_processor/util.cpp @@ -0,0 +1,20 @@ +#include "util.h" +#include <iostream> + +void check_call(const std::vector<std::string>& cmd) { + std::string cmdstr; + bool first = true; + for (const auto& segment : cmd) { + if (first) { + first = false; + } else { + cmdstr += " "; + } + cmdstr += segment; + } + int code = system(cmdstr.c_str()); + if (code != 0) { + std::cerr << cmdstr << " failed with return code " << code << std::endl; + std::exit(1); + } +} |
