From e22771628f5a3f92f0fbb7ac3541cdcea34a3197 Mon Sep 17 00:00:00 2001 From: Koki Ueha Date: Mon, 6 Mar 2023 14:00:35 +0000 Subject: [PATCH 1/2] install: move help strings to markdown file --- src/uu/install/install.md | 8 ++++++++ src/uu/install/src/install.rs | 7 +++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 src/uu/install/install.md diff --git a/src/uu/install/install.md b/src/uu/install/install.md new file mode 100644 index 000000000..ac6a70f42 --- /dev/null +++ b/src/uu/install/install.md @@ -0,0 +1,8 @@ +# install + +``` +install [OPTION]... [FILE]... +``` + +Copy SOURCE to DEST or multiple SOURCE(s) to the existing +DIRECTORY, while setting permission modes and owner/group diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index c4c8f095b..163219d1e 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -19,7 +19,7 @@ use uucore::error::{FromIo, UError, UIoError, UResult, UUsageError}; use uucore::fs::dir_strip_dot_for_creation; use uucore::mode::get_umask; use uucore::perms::{wrap_chown, Verbosity, VerbosityLevel}; -use uucore::{format_usage, show, show_error, show_if_err, uio_error}; +use uucore::{format_usage, show, show_error, show_if_err, uio_error, help_about, help_usage}; use libc::{getegid, geteuid}; use std::error::Error; @@ -144,9 +144,8 @@ impl Behavior { } } -static ABOUT: &str = "Copy SOURCE to DEST or multiple SOURCE(s) to the existing - DIRECTORY, while setting permission modes and owner/group"; -const USAGE: &str = "{} [OPTION]... [FILE]..."; +const ABOUT: &str = help_about!("install.md"); +const USAGE: &str = help_usage!("install.md"); static OPT_COMPARE: &str = "compare"; static OPT_DIRECTORY: &str = "directory"; From 7daa258089e46f6ce1284672b1a92cca26e8c2f6 Mon Sep 17 00:00:00 2001 From: Koki Ueha Date: Mon, 6 Mar 2023 14:03:54 +0000 Subject: [PATCH 2/2] install: cargo fmt --- src/uu/install/src/install.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 163219d1e..98fdb47d6 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -19,7 +19,7 @@ use uucore::error::{FromIo, UError, UIoError, UResult, UUsageError}; use uucore::fs::dir_strip_dot_for_creation; use uucore::mode::get_umask; use uucore::perms::{wrap_chown, Verbosity, VerbosityLevel}; -use uucore::{format_usage, show, show_error, show_if_err, uio_error, help_about, help_usage}; +use uucore::{format_usage, help_about, help_usage, show, show_error, show_if_err, uio_error}; use libc::{getegid, geteuid}; use std::error::Error;