cmake update

This commit is contained in:
Nicholas O'Connor
2018-03-13 20:30:47 -07:00
parent 429b19abee
commit a74796f2f3
16 changed files with 377 additions and 135 deletions

View File

@@ -1,28 +0,0 @@
// vim: ft=cpp :
#include "nlohmann/json.hpp"
#include "config.hpp"
using namespace std;
using nlohmann::json;
json cellar::config::get_default_config() {
json result;
/*[[[cog
import cog
import configparser
cparse = configparser.ConfigParser()
cparse.read("cogrc")
config = cparse["defaults"]
for key in config.keys(): # TODO: bug #26
value = config[key]
print(" -- Compiling in default value for {0}: {1}".format(key, value))
cog.outl("result[\"{0}\"] = \"{1}\";".format(key, value))
]]]*/
//[[[end]]]
return result;
}

View File

@@ -111,13 +111,9 @@ int main(int argc, char* argv[]) {
output::warning("your shell didn't expand your given path properly, doing a naive replacement", true);
bottles::active_bottle = bottles::Bottle(bottlechoice);
} else {
if (bottlechoice.substr(0,6) == ".wine.") {
output::statement("tip: cellar can add the \".wine.\" prefix automatically");
bottlechoice.replace(0,6,"");
}
string homepath = getenv("HOME");
string fullbottlepath = homepath + "/.wine." + bottlechoice;
string fullbottlepath = homepath + "/.local/share/cellar/bottles/" + bottlechoice;
bottles::active_bottle = bottles::Bottle(fullbottlepath);
}
}