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.
This commit is contained in:
Lux Aliaga 2023-02-19 13:15:48 -03:00
parent 2a4ee258a3
commit d148a96e06
Signed by: lux
GPG Key ID: B56C805968637437
2 changed files with 9 additions and 9 deletions

View File

@ -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(())

View File

@ -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)?,
},