diff --git a/src/main.cpp b/src/main.cpp index fa1644f..21bb619 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,6 @@ #include "utils/directories.hpp" #include "templates.hpp" #include "utils/utils.hpp" -#include "utils/readmes.hpp" #include "autocomplete.hpp" #include "utils/hash.hpp" @@ -107,7 +106,7 @@ int main(int argc, char* argv[]) { HAPPYEXIT("hash", hash_demo_raw(safearg(argc,argv,2))) HAPPYEXIT("makesafecmd", std::cout< -#include -#include - -namespace fs = std::filesystem; - -namespace dropshell { - -service_versions::service_versions(const std::string & server_name, const std::string & service_name) - : m_server_name(server_name), m_service_name(service_name) -{ -} - -uint64_t service_versions::calculate_version_local_service_template() -{ - template_info tinfo; - if (!get_template_info(m_service_name, tinfo)) { - return 0; - } - return hash_directory_recursive(tinfo.local_template_path); -} - -uint64_t service_versions::calculate_version_local_config() -{ - std::string config_path = localpath::service(m_server_name, m_service_name); - if (config_path.empty() || !fs::exists(config_path)) { - return 0; - } - return hash_directory_recursive(config_path); -} - -void service_versions::update_stored_remote_versions() -{ - uint64_t template_hash = calculate_version_remote_service_template(); - uint64_t config_hash = calculate_version_remote_config(); - - // TODO - actually update things! -} - -uint64_t service_versions::get_version_remote_config() -{ - // TODO - actually get the version! - return 0; -} - -uint64_t service_versions::get_version_remote_service_template() -{ - // TODO - actually get the version! - return 0; -} - -uint64_t service_versions::calculate_version_remote_service_template() -{ - // TODO - actually get the version! - return 0; -} - -uint64_t service_versions::calculate_version_remote_config() -{ - // TODO - actually get the version! - return 0; -} - -} // namespace dropshell \ No newline at end of file diff --git a/src/templates.cpp b/src/templates.cpp index c5d1935..cf05ca1 100644 --- a/src/templates.cpp +++ b/src/templates.cpp @@ -65,8 +65,6 @@ std::cout << "Available templates:" << std::endl; - // sort templates alphabetically. - std::sort(templates.begin(), templates.end()); // print templates. std::cout << std::string(60, '-') << std::endl; bool first = true;