From 5a76295cb086802c503c4ead320c2b26b0bca2cc Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 23 Mar 2020 07:49:00 -0500 Subject: CLI Tools: Update messages, and make them more consistent --- tools/hscript-simulate/simulator.cc | 13 ++++++++----- tools/hscript-validate/validator.cc | 15 +++++++++------ 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/hscript-simulate/simulator.cc b/tools/hscript-simulate/simulator.cc index 7162c4b..1731c62 100644 --- a/tools/hscript-simulate/simulator.cc +++ b/tools/hscript-simulate/simulator.cc @@ -2,7 +2,7 @@ * simulator.cc - Implementation of the HorizonScript simulation utility * Project Horizon * - * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved. + * Copyright (c) 2019-2020 Adélie Linux and contributors. All rights reserved. * This code is licensed under the AGPL 3.0 license, as noted in the * LICENSE-code file in the root directory of this repository. * @@ -86,12 +86,15 @@ int main(int argc, char *argv[]) { #ifdef NON_LIBRE_FIRMWARE colour_if_pretty(std::cout, "31"); std::cout << " (supports non-free firmware)"; -#endif reset_if_pretty(std::cout); +#endif std::cout << std::endl; if(isatty(1)) { /* LCOV_EXCL_START */ - std::cout << "Copyright (c) 2019 Adélie Linux and contributors. AGPL-3.0 license." << std::endl; + std::cout << "Copyright (c) 2019-2020 Adélie Linux and contributors."; std::cout << std::endl; + std::cout << "This software is licensed to you under the terms of the " + << std::endl << "AGPL 3.0 license, unless otherwise noted."; + std::cout << std::endl << std::endl; } /* LCOV_EXCL_STOP */ my_script = Horizon::Script::load(installfile, opts); @@ -101,10 +104,10 @@ int main(int argc, char *argv[]) { } if(!my_script->execute()) { - output_error("installfile", "Script failed. Stop.", ""); + output_error("internal", "Script failed. Stop.", ""); result_code = EXIT_FAILURE; } else { - output_info("installfile", "Script completed.", ""); + output_info("internal", "Script completed successfully.", ""); } delete my_script; diff --git a/tools/hscript-validate/validator.cc b/tools/hscript-validate/validator.cc index fe5a1f6..77641c7 100644 --- a/tools/hscript-validate/validator.cc +++ b/tools/hscript-validate/validator.cc @@ -2,7 +2,7 @@ * validator.cc - Implementation of the HorizonScript validation utility * Project Horizon * - * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved. + * Copyright (c) 2019-2020 Adélie Linux and contributors. All rights reserved. * This code is licensed under the AGPL 3.0 license, as noted in the * LICENSE-code file in the root directory of this repository. * @@ -88,11 +88,14 @@ int main(int argc, char *argv[]) { #ifdef NON_LIBRE_FIRMWARE colour_if_pretty(std::cout, "31"); std::cout << " (supports non-free firmware)"; -#endif reset_if_pretty(std::cout); +#endif std::cout << std::endl; - std::cout << "Copyright (c) 2019 Adélie Linux and contributors. AGPL-3.0 license." << std::endl; - std::cout << std::endl; + std::cout << "Copyright (c) 2019-2020 Adélie Linux and contributors." + << std::endl; + std::cout << "This software is licensed to you under the terms of the " + << std::endl << "AGPL 3.0 license, unless otherwise noted."; + std::cout << std::endl << std::endl; my_script = Horizon::Script::load(installfile, opts); if(my_script == nullptr) { @@ -101,10 +104,10 @@ int main(int argc, char *argv[]) { } if(!my_script->validate()) { - output_error("installfile", "Script failed validation step. Stop.", ""); + output_error("internal", "Script failed validation. Stop.", ""); result_code = EXIT_FAILURE; } else { - output_info("installfile", "Script passed validation.", ""); + output_info("internal", "Script passed validation.", ""); } delete my_script; -- cgit v1.2.3-60-g2f50