From bdaf45ff85076cec93b68cd45c018bc02e2fa67e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 25 Aug 2020 20:09:12 -0700 Subject: declutter top-level files into extra/ --- Cargo.toml | 4 ++-- Makefile | 6 ++--- es-public-proxy.1 | 52 ------------------------------------------- es-public-proxy.1.scdoc | 36 ------------------------------ example_config.toml | 12 ---------- extra/es-public-proxy.1 | 52 +++++++++++++++++++++++++++++++++++++++++++ extra/es-public-proxy.1.scdoc | 36 ++++++++++++++++++++++++++++++ extra/example_config.toml | 12 ++++++++++ src/main.rs | 2 +- 9 files changed, 106 insertions(+), 106 deletions(-) delete mode 100644 es-public-proxy.1 delete mode 100644 es-public-proxy.1.scdoc delete mode 100644 example_config.toml create mode 100644 extra/es-public-proxy.1 create mode 100644 extra/es-public-proxy.1.scdoc create mode 100644 extra/example_config.toml diff --git a/Cargo.toml b/Cargo.toml index ca04f6b..cc3fa5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,6 @@ section = "utility" priority = "optional" assets = [ ["target/release/es-public-proxy", "usr/bin/", "755"], - ["es-public-proxy.1", "usr/share/man/man1/", "644"], - ["example_config.toml", "usr/share/doc/es-public-proxy/", "644"], + ["extra/es-public-proxy.1", "usr/share/man/man1/", "644"], + ["extra/example_config.toml", "usr/share/doc/es-public-proxy/", "644"], ] diff --git a/Makefile b/Makefile index 41c4217..de2d568 100644 --- a/Makefile +++ b/Makefile @@ -26,11 +26,11 @@ fmt: ## Run syntax re-formatting build: ## Build (debug) cargo build -es-public-proxy.1: es-public-proxy.1.scdoc - scdoc < es-public-proxy.1.scdoc > es-public-proxy.1 +extra/es-public-proxy.1: extra/es-public-proxy.1.scdoc + scdoc < extra/es-public-proxy.1.scdoc > extra/es-public-proxy.1 .PHONY: manpage -manpage: es-public-proxy.1 ## Rebuild manpage using scdoc +manpage: extra/es-public-proxy.1 ## Rebuild manpage using scdoc .PHONY: deb deb: ## Build debian packages (.deb files) diff --git a/es-public-proxy.1 b/es-public-proxy.1 deleted file mode 100644 index ee12f43..0000000 --- a/es-public-proxy.1 +++ /dev/null @@ -1,52 +0,0 @@ -.\" Generated by scdoc 1.9.0 -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.nh -.ad l -.\" Begin generated content: -.TH "es-public-proxy" "1" "2020-08-26" "es-public-proxy Manual Page" -.P -.SH NAME -.P -es-public-proxy - something something -.P -.SH SYNOPSIS -.P -es-public-proxy --config CONFIGFILE -.P -.SH DESCRIPTION -.P -.SH OPTIONS -.P -Argument processing is crude; only one option can be specified at a time. -.P -\fB-h, --help\fR -.RS 4 -Prints help information -.P -.RE -\fB-V, --version\fR -.RS 4 -Prints version information -.P -.RE -\fB--config \fR [env: ES_PUBLIC_PROXY_CONFIG_PATH] -.RS 4 -Supply path to configuration file (TOML), which is effectively required for operation -.P -.RE -\fB--example-config\fR -.RS 4 -An annotated config file (TOML) will be printed to standard out. -.P -.RE -.SH EXAMPLES -.P -Some examples of usage will go here. -.P -.RS 4 -es-public-proxy --example-config > /etc/es_public_proxy.toml -.P -es-public-proxy --config /etc/es_public_proxy.toml -.P -.RE diff --git a/es-public-proxy.1.scdoc b/es-public-proxy.1.scdoc deleted file mode 100644 index 00104d9..0000000 --- a/es-public-proxy.1.scdoc +++ /dev/null @@ -1,36 +0,0 @@ -es-public-proxy(1) "es-public-proxy Manual Page" - -# NAME - -es-public-proxy - something something - -# SYNOPSIS - -es-public-proxy --config CONFIGFILE - -# DESCRIPTION - -# OPTIONS - -Argument processing is crude; only one option can be specified at a time. - -*-h, --help* - Prints help information - -*-V, --version* - Prints version information - -*--config * [env: ES_PUBLIC_PROXY_CONFIG_PATH] - Supply path to configuration file (TOML), which is effectively required for operation - -*--example-config* - An annotated config file (TOML) will be printed to standard out. - -# EXAMPLES - -Some examples of usage will go here. - - es-public-proxy --example-config > /etc/es_public_proxy.toml - - es-public-proxy --config /etc/es_public_proxy.toml - diff --git a/example_config.toml b/example_config.toml deleted file mode 100644 index cd66403..0000000 --- a/example_config.toml +++ /dev/null @@ -1,12 +0,0 @@ - -bind_addr = "127.0.0.1:9292" -upstream_addr = "127.0.0.1:9200" -allow_all_indices = false - -# Index-level configuration -[[index]] -name = "test" - -# Configure additional indices by repeating the [[index]] block -#[[index]] -#name = "some-other-index" diff --git a/extra/es-public-proxy.1 b/extra/es-public-proxy.1 new file mode 100644 index 0000000..ee12f43 --- /dev/null +++ b/extra/es-public-proxy.1 @@ -0,0 +1,52 @@ +.\" Generated by scdoc 1.9.0 +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.nh +.ad l +.\" Begin generated content: +.TH "es-public-proxy" "1" "2020-08-26" "es-public-proxy Manual Page" +.P +.SH NAME +.P +es-public-proxy - something something +.P +.SH SYNOPSIS +.P +es-public-proxy --config CONFIGFILE +.P +.SH DESCRIPTION +.P +.SH OPTIONS +.P +Argument processing is crude; only one option can be specified at a time. +.P +\fB-h, --help\fR +.RS 4 +Prints help information +.P +.RE +\fB-V, --version\fR +.RS 4 +Prints version information +.P +.RE +\fB--config \fR [env: ES_PUBLIC_PROXY_CONFIG_PATH] +.RS 4 +Supply path to configuration file (TOML), which is effectively required for operation +.P +.RE +\fB--example-config\fR +.RS 4 +An annotated config file (TOML) will be printed to standard out. +.P +.RE +.SH EXAMPLES +.P +Some examples of usage will go here. +.P +.RS 4 +es-public-proxy --example-config > /etc/es_public_proxy.toml +.P +es-public-proxy --config /etc/es_public_proxy.toml +.P +.RE diff --git a/extra/es-public-proxy.1.scdoc b/extra/es-public-proxy.1.scdoc new file mode 100644 index 0000000..00104d9 --- /dev/null +++ b/extra/es-public-proxy.1.scdoc @@ -0,0 +1,36 @@ +es-public-proxy(1) "es-public-proxy Manual Page" + +# NAME + +es-public-proxy - something something + +# SYNOPSIS + +es-public-proxy --config CONFIGFILE + +# DESCRIPTION + +# OPTIONS + +Argument processing is crude; only one option can be specified at a time. + +*-h, --help* + Prints help information + +*-V, --version* + Prints version information + +*--config * [env: ES_PUBLIC_PROXY_CONFIG_PATH] + Supply path to configuration file (TOML), which is effectively required for operation + +*--example-config* + An annotated config file (TOML) will be printed to standard out. + +# EXAMPLES + +Some examples of usage will go here. + + es-public-proxy --example-config > /etc/es_public_proxy.toml + + es-public-proxy --config /etc/es_public_proxy.toml + diff --git a/extra/example_config.toml b/extra/example_config.toml new file mode 100644 index 0000000..cd66403 --- /dev/null +++ b/extra/example_config.toml @@ -0,0 +1,12 @@ + +bind_addr = "127.0.0.1:9292" +upstream_addr = "127.0.0.1:9200" +allow_all_indices = false + +# Index-level configuration +[[index]] +name = "test" + +# Configure additional indices by repeating the [[index]] block +#[[index]] +#name = "some-other-index" diff --git a/src/main.rs b/src/main.rs index 90161ad..d95ef4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,7 +76,7 @@ fn load_config() -> ProxyConfig { std::process::exit(0); } [_, "--example-config"] => { - println!("{}", include_str!("../example_config.toml")); + println!("{}", include_str!("../extra/example_config.toml")); std::process::exit(0); } [_, "--config", p] => config_path = Some(p.to_string()), -- cgit v1.2.3