From 92b05a877eb772985d2f4fc9cd198ca642b69b6a Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 8 Feb 2022 09:21:12 +0000 Subject: removed old code --- dotup_cli/src/commands/init.rs | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 dotup_cli/src/commands/init.rs (limited to 'dotup_cli/src/commands/init.rs') diff --git a/dotup_cli/src/commands/init.rs b/dotup_cli/src/commands/init.rs deleted file mode 100644 index 45129bf..0000000 --- a/dotup_cli/src/commands/init.rs +++ /dev/null @@ -1,22 +0,0 @@ -use super::prelude::*; - -/// Creates an empty depot file if one doesnt already exist. -/// -/// By default this will create the file in the current directory -/// but the --depot flag can be used to change this path. -#[derive(Parser)] -pub struct Opts {} - -pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> { - if !dotup::utils::is_file(&config.archive_path)? { - let archive = Archive::default(); - log::info!("Creating archive at {}", &config.archive_path.display()); - utils::write_archive(&config.archive_path, &archive)?; - } else { - log::warn!( - "Archive file already exists : '{}'", - config.archive_path.display() - ); - } - Ok(()) -} -- cgit