Tidy
This commit is contained in:
19
src/main.cpp
19
src/main.cpp
@ -5,6 +5,7 @@
|
||||
#include "servers.hpp"
|
||||
#include "utils/directories.hpp"
|
||||
#include "templates.hpp"
|
||||
#include "utils/utils.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <iostream>
|
||||
@ -22,7 +23,8 @@ void print_version() {
|
||||
|
||||
|
||||
void print_help() {
|
||||
std::cout << "Usage: dropshell [OPTIONS] COMMAND [ARGS]" << std::endl;
|
||||
std::cout << std::endl;
|
||||
maketitle("DropShell version " + VERSION);
|
||||
std::cout << std::endl;
|
||||
std::cout << "A tool for managing server configurations" << std::endl;
|
||||
std::cout << std::endl;
|
||||
@ -30,18 +32,17 @@ void print_help() {
|
||||
std::cout << " version Show version information" << std::endl;
|
||||
std::cout << " init DIR Initialise the local dropshell directory (local config, backups, etc)" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Server commands:" << std::endl;
|
||||
std::cout << " servers Summary of all configured servers" << std::endl;
|
||||
std::cout << " servers NAME Show details for specific server" << std::endl;
|
||||
std::cout << " templates List all available templates" << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Service commands: (if no service is specified, all services for the server are affected)" << std::endl;
|
||||
std::cout << " install SERVER [SERVICE] Install/Update service(s)." << std::endl;
|
||||
std::cout << " backup SERVER [SERVICE] Backup service(s)." << std::endl;
|
||||
std::cout << " uninstall SERVER [SERVICE] Uninstall service(s)." << std::endl;
|
||||
std::cout << " start SERVER [SERVICE] Start service(s)." << std::endl;
|
||||
std::cout << " stop SERVER [SERVICE] Stop service(s)." << std::endl;
|
||||
std::cout << " COMMAND SERVER [SERVICE] Run a command on service(s)." << std::endl;
|
||||
std::cout << " COMMAND SERVER [SERVICE] Run a command on service(s)." << std::endl;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Standard commands: install, backup, uninstall, start, stop" << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
@ -170,6 +171,10 @@ int main(int argc, char* argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string lcd;
|
||||
cfg->get_local_config_directory(lcd);
|
||||
std::cout << "Local config path: " << lcd << std::endl;
|
||||
|
||||
// No arguments provided
|
||||
if (argc < 2) {
|
||||
dropshell::print_help();
|
||||
|
Reference in New Issue
Block a user