From d148a96e065011b30d13b0477611b92af0dc919a Mon Sep 17 00:00:00 2001 From: Lux Aliaga Date: Sun, 19 Feb 2023 13:15:48 -0300 Subject: [PATCH] archive: Reword Vento directory archives Calling the action of archiving the Vento directory "Archiving Vento installs" was a bit misleading, so I changed it to Vento directories. --- src/archive.rs | 8 ++++---- src/bin/vento.rs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/archive.rs b/src/archive.rs index 93f5c92..08a89dd 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -54,7 +54,7 @@ pub fn export_inv(slot: &str, output: PathBuf, message: bool) -> Result<()> { Ok(()) } -pub fn export_install(output: PathBuf, message: bool) -> Result<()> { +pub fn export_dir(output: PathBuf, message: bool) -> Result<()> { let dir: PathBuf = common::env_config()?.vento_dir; let archive = File::create(&output)?; @@ -65,7 +65,7 @@ pub fn export_install(output: PathBuf, message: bool) -> Result<()> { if message { println!( "✅ {} {}", - "Exported Vento install into".green(), + "Exported Vento directory into".green(), &output.to_str().unwrap() ); }; @@ -102,7 +102,7 @@ pub fn import_inv(input: PathBuf, slot: &str, message: bool) -> Result<()> { Ok(()) } -pub fn import_install(input: PathBuf, message: bool) -> Result<()> { +pub fn import_dir(input: PathBuf, message: bool) -> Result<()> { let dir: PathBuf = common::env_config()?.vento_dir; let tar_xz = File::open(&input)?; @@ -115,7 +115,7 @@ pub fn import_install(input: PathBuf, message: bool) -> Result<()> { "✅ {} {} {}", "Imported".green(), &input.to_str().unwrap(), - "into Vento install".green(), + "into Vento directory".green(), ); }; Ok(()) diff --git a/src/bin/vento.rs b/src/bin/vento.rs index d4b33fd..7ec5ffb 100644 --- a/src/bin/vento.rs +++ b/src/bin/vento.rs @@ -60,9 +60,9 @@ fn main() -> Result<()> { 2 => archive::export_inv("active", PathBuf::from("active.tar.xz"), true)?, _ => throw_error(ErrorType::TooManyArgs)?, }, - "-E" | "--export-install" => match args.len() { - 3 => archive::export_install(PathBuf::from(&args[2]), true)?, - 2 => archive::export_install(PathBuf::from("vento.tar.xz"), true)?, + "-E" | "--export-dir" => match args.len() { + 3 => archive::export_dir(PathBuf::from(&args[2]), true)?, + 2 => archive::export_dir(PathBuf::from("vento.tar.xz"), true)?, _ => throw_error(ErrorType::TooManyArgs)?, }, "-g" | "--import-inv" => match args.len() { @@ -71,8 +71,8 @@ fn main() -> Result<()> { 2 => throw_error(ErrorType::SpecifyFile)?, _ => throw_error(ErrorType::TooManyArgs)?, }, - "-G" | "--import-install" => match args.len() { - 3 => archive::import_install(PathBuf::from(&args[2]), true)?, + "-G" | "--import-dir" => match args.len() { + 3 => archive::import_dir(PathBuf::from(&args[2]), true)?, 2 => throw_error(ErrorType::SpecifyFile)?, _ => throw_error(ErrorType::TooManyArgs)?, },