aboutsummaryrefslogtreecommitdiff
path: root/src/lua_build.cc
blob: fd0718428ba9679884f8b21aafc01bc7e48a60a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "lua_build.hh"
#include "lua_state.hh"
#include "vars.hh"
#include <filesystem>
#include <iostream>
#include <unordered_map>

bool lua_build(const char *repository, const char *target, const char *path) {
  std::cout << print_pkgit << "attempting to use build function specified in 'repositories." << repository << "'..." << std::endl;
  if (repo_build(repository)) {
    return true;
  }

  std::cout << print_pkgit << "attempting to use build function specified in 'bldit.lua'..." << std::endl;
  if (bldit(target)) {
    return true;
  }

  std::cout << print_pkgit << "attempting to use build functions specified in 'build_systems'..." << std::endl;
  if (config_build(path)) {
    return true;
  }

  return false;
}