summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-03-23 07:49:00 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-03-23 07:49:00 -0500
commit5a76295cb086802c503c4ead320c2b26b0bca2cc (patch)
treefb1f45ae0281ffdcbc73c5548615b50c5c1b333a
parent0412062c13235fab34cc739ac60b473b296743d2 (diff)
downloadhorizon-5a76295cb086802c503c4ead320c2b26b0bca2cc.tar.gz
horizon-5a76295cb086802c503c4ead320c2b26b0bca2cc.tar.bz2
horizon-5a76295cb086802c503c4ead320c2b26b0bca2cc.tar.xz
horizon-5a76295cb086802c503c4ead320c2b26b0bca2cc.zip
CLI Tools: Update messages, and make them more consistent
-rw-r--r--executor/executor.cc19
-rw-r--r--tools/hscript-simulate/simulator.cc13
-rw-r--r--tools/hscript-validate/validator.cc15
3 files changed, 27 insertions, 20 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 7d9c3bf..c0fe0e6 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -2,7 +2,7 @@
* executor.cc - Implementation of the HorizonScript executor
* 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.
*
@@ -34,25 +34,26 @@ int main(void) {
#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("/etc/horizon/installfile", opts);
if(my_script == nullptr) {
- std::cout << "Could not load the specified script." << std::endl;
+ std::cout << "Could not load the HorizonScript." << std::endl;
return EXIT_FAILURE;
}
if(!my_script->execute()) {
- output_error("installfile", "Script failed. Stop.", "");
+ output_error("internal", "Script failed. Stop.", "");
result_code = EXIT_FAILURE;
} else {
- output_info("installfile",
- "Adélie Linux has been successfully installed.", "");
+ output_info("internal", "Installation completed successfully.", "");
}
delete my_script;
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;