support for being specific about your bottle, via -b flag

This commit is contained in:
Nicholas O'Connor
2017-03-24 21:50:32 -07:00
parent f20b0899a1
commit 06512f0503
5 changed files with 60 additions and 33 deletions

View File

@@ -30,6 +30,7 @@ Bottle::Bottle() {
}
Bottle::Bottle(string patharg) {
output::statement("loading bottle from " + patharg, true);
config = json({});
path = patharg;

View File

@@ -1,8 +1,8 @@
#include <cstdlib>
#include <string>
#include <vector>
#include "bottles.hpp"
#include "cellar.hpp"
#include "internal/bottles.hpp"
#include "output.hpp"
@@ -26,11 +26,6 @@ void cellar::bottles::config_command(int argc, vector<string> argv) {
return;
}
// TEMP
string homedir = getenv("HOME");
Bottle active_bottle = Bottle(homedir + "/.wine");
active_bottle.load_config();
string key = argv[2];
string value = active_bottle.get_config(key);
@@ -45,11 +40,6 @@ void cellar::bottles::config_command(int argc, vector<string> argv) {
return;
}
// TEMP
string homedir = getenv("HOME");
Bottle active_bottle = Bottle(homedir + "/.wine");
active_bottle.load_config();
string key = argv[2];
string newvalue = argv[3];
string oldvalue = active_bottle.get_config(key);