aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-20 20:46:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-20 21:41:47 +0300
commitaff2607a28b72279257eb2756c74abd91b4a3960 (patch)
tree1ea239923d5f829514eb4090a7af34ff9a286d0e
parent250d64faada1a9d0212be07cab6d54a112689b1b (diff)
Get rid of libbbot::variable
-rw-r--r--bbot/machine-manifest5
-rw-r--r--bbot/machine-manifest.cxx8
-rw-r--r--bbot/worker.cxx5
3 files changed, 13 insertions, 5 deletions
diff --git a/bbot/machine-manifest b/bbot/machine-manifest
index 9975a3b..ec14c3f 100644
--- a/bbot/machine-manifest
+++ b/bbot/machine-manifest
@@ -35,7 +35,10 @@ namespace bbot
public:
machine_type type;
optional<string> mac; // Required in bootstrapped machine manifest.
- optional<strings> options;
+ optional<strings> options; // Note: could be quoted.
+
+ strings
+ unquoted_options (); // Return empty if absent.
machine_manifest (std::string i,
std::string n,
diff --git a/bbot/machine-manifest.cxx b/bbot/machine-manifest.cxx
index 2edf3dc..debdbcc 100644
--- a/bbot/machine-manifest.cxx
+++ b/bbot/machine-manifest.cxx
@@ -212,6 +212,14 @@ namespace bbot
s.next ("", ""); // End of manifest.
}
+ strings machine_manifest::
+ unquoted_options ()
+ {
+ return options
+ ? string_parser::unquote (*options)
+ : strings ();
+ }
+
// toolchain_manifest
//
toolchain_manifest::
diff --git a/bbot/worker.cxx b/bbot/worker.cxx
index a2e53b2..bd706a8 100644
--- a/bbot/worker.cxx
+++ b/bbot/worker.cxx
@@ -178,10 +178,6 @@ build (size_t argc, const char* argv[])
//
const vector_view<const char*> env (argv + 1, argc - 1);
- vector<string> cfg;
- for (const variable& v: tm.config)
- cfg.push_back (v.unquoted ());
-
// Use target (if present) or machine as configuration directory name.
//
dir_path dir (tm.target ? tm.target->string () : tm.machine);
@@ -190,6 +186,7 @@ build (size_t argc, const char* argv[])
"create",
"-d", dir.string (),
"--wipe",
+ tm.unquoted_config (),
cfg,
env);