summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-16 04:10:49 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-16 04:10:49 -0500
commit88a7ce8c0d9069d3b37f3e1ac82f772e4378fbd4 (patch)
treec01c7e867ab18d1d71f2e210d43f0c713f6a6a31 /tools
parentd9bef08be8c0f2c430c36bb753f61fc4e8e6706f (diff)
downloadhorizon-88a7ce8c0d9069d3b37f3e1ac82f772e4378fbd4.tar.gz
horizon-88a7ce8c0d9069d3b37f3e1ac82f772e4378fbd4.tar.bz2
horizon-88a7ce8c0d9069d3b37f3e1ac82f772e4378fbd4.tar.xz
horizon-88a7ce8c0d9069d3b37f3e1ac82f772e4378fbd4.zip
validator: Add manual page
Diffstat (limited to 'tools')
-rw-r--r--tools/hscript-validate/CMakeLists.txt1
-rw-r--r--tools/hscript-validate/validator.162
2 files changed, 63 insertions, 0 deletions
diff --git a/tools/hscript-validate/CMakeLists.txt b/tools/hscript-validate/CMakeLists.txt
index 6eae7cc..902afd7 100644
--- a/tools/hscript-validate/CMakeLists.txt
+++ b/tools/hscript-validate/CMakeLists.txt
@@ -5,6 +5,7 @@ add_executable(hscript-validate ${VALIDATE_SRCS})
target_link_libraries(hscript-validate hscript ${Boost_LIBRARIES})
install(TARGETS hscript-validate DESTINATION bin)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/validator.1 DESTINATION share/man/man1 RENAME hscript-validate.1)
IF(RSPEC_EXECUTABLE)
add_test(NAME "RSpecValidator"
diff --git a/tools/hscript-validate/validator.1 b/tools/hscript-validate/validator.1
new file mode 100644
index 0000000..b57a227
--- /dev/null
+++ b/tools/hscript-validate/validator.1
@@ -0,0 +1,62 @@
+.Dd May 16, 2020
+.Dt HSCRIPT-VALIDATE 1
+.Os "Adélie Linux"
+.Sh NAME
+.Nm hscript-validate
+.Nd ensure the validity of a HorizonScript
+.Sh SYNOPSIS
+.Nm
+.Op Fl ikns
+.Ar INSTALLFILE
+.Sh DESCRIPTION
+The
+.Nm
+utility validates a HorizonScript, ensuring that it is free from syntax
+errors and that all required values are present and meet any requirements.
+.Sh OPTIONS
+The
+.Nm
+utility supports the following options:
+.Bl -tag -width Ds
+.It Fl i
+Set the Installation Environment flag. This is VERY DANGEROUS, as it will
+treat your host system as the target for purposes of validation. Unless you
+are very sure of what you are doing, do not use this flag!
+.It Fl k
+Keep going after parsing errors. This allows you to see all errors at once,
+instead of having each error be immediately fatal.
+.It Fl n
+Disables colour output and ANSI escape sequences in any log messages. This
+is the default when not running from a terminal.
+.It Fl s
+Enables Strict mode, which causes more potential issues to be errors instead
+of warnings.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+The following invocation will validate the HorizonScript at
+.Pa example.installfile :
+.Dl $ hscript-validate example.installfile
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "%dateT%time log %location: %status: %message[: %extra]"
+A message of type
+.Cm %status
+was logged while processing
+.Cm %location .
+The log message
+.Cm %message
+may be followed by additional information or hints in
+.Cm %extra .
+.El
+.Sh SEE ALSO
+.Xr hscript-simulate 1 ,
+.Xr hscript 5 .
+.Sh HISTORY
+The
+.Nm
+command first appeared in Horizon 0.1.
+.Sh AUTHORS
+.An A. Wilcox
+.Aq awilfox@adelielinux.org