beginnings of a config command
This commit is contained in:
parent
ece1c07b1a
commit
04f2c46def
@ -44,14 +44,14 @@ foreach(cogfile ${cogfiles})
|
|||||||
COMMAND ${PYTHON_EXECUTABLE} -m cogapp -d -o "${outfile}" "${cogfile}"
|
COMMAND ${PYTHON_EXECUTABLE} -m cogapp -d -o "${outfile}" "${cogfile}"
|
||||||
DEPENDS ${cogfile}
|
DEPENDS ${cogfile}
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
COMMENT "Greasing the cog for ${thisfile}")
|
COMMENT "Greasing the cog for ${outfile}")
|
||||||
|
|
||||||
set(coggedfiles ${coggedfiles} "${thisfile}")
|
set(coggedfiles ${coggedfiles} "${thisfile}")
|
||||||
endforeach(cogfile)
|
endforeach(cogfile)
|
||||||
|
|
||||||
add_library(bottles SHARED ${src}/bottles/bottles.cpp
|
add_library(bottles SHARED ${src}/bottles/bottles.cpp
|
||||||
${src}/bottles/active.cpp ${src}/bottles/commands.cpp
|
${src}/bottles/active.cpp ${src}/bottles/commands.cpp
|
||||||
${src}/bottles/activate.cpp)
|
${src}/bottles/activate.cpp ${src}/bottles/config/cli_handler.cpp)
|
||||||
add_dependencies(bottles cog)
|
add_dependencies(bottles cog)
|
||||||
|
|
||||||
add_library(launch SHARED ${src}/launch/launch.cpp ${src}/launch/commands.cpp
|
add_library(launch SHARED ${src}/launch/launch.cpp ${src}/launch/commands.cpp
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
list print_bottles
|
list print_bottles
|
||||||
active print_active_bottle
|
active print_active_bottle
|
||||||
activate switch_active_bottle
|
activate switch_active_bottle
|
||||||
|
config config_command
|
||||||
|
24
src/bottles/config/cli_handler.cpp
Normal file
24
src/bottles/config/cli_handler.cpp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "json.hpp"
|
||||||
|
|
||||||
|
#include "bottles.hpp"
|
||||||
|
#include "internal/bottles.hpp"
|
||||||
|
#include "output.hpp"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
using namespace cellar;
|
||||||
|
using namespace cellar::bottles;
|
||||||
|
|
||||||
|
using json = nlohmann::json;
|
||||||
|
|
||||||
|
void cellar::bottles::config_command(int argc, vector<string> argv) {
|
||||||
|
if (argc == 1) {
|
||||||
|
output::error("not enough arguments");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string command = argv[1];
|
||||||
|
|
||||||
|
output::statement(command);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user