aboutsummaryrefslogtreecommitdiff
path: root/dotup_cli/src/commands/install.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dotup_cli/src/commands/install.rs')
-rw-r--r--dotup_cli/src/commands/install.rs25
1 files changed, 0 insertions, 25 deletions
diff --git a/dotup_cli/src/commands/install.rs b/dotup_cli/src/commands/install.rs
deleted file mode 100644
index 6d9fbf7..0000000
--- a/dotup_cli/src/commands/install.rs
+++ /dev/null
@@ -1,25 +0,0 @@
1use std::path::PathBuf;
2
3use super::prelude::*;
4
5/// Install links. (Creates symlinks).
6///
7/// Installing a link will create the necessary directories.
8/// If a file or directory already exists at the location a link would be installed this command will fail.
9#[derive(Parser)]
10pub struct Opts {
11 /// The files/directories to install.
12 #[clap(min_values = 1, default_value = ".")]
13 paths: Vec<PathBuf>,
14}
15
16pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> {
17 let depot = utils::read_depot(&config.archive_path)?;
18
19 for link in utils::collect_links_by_base_paths(&depot, &opts.paths) {
20 log::info!("Installing link {}", link);
21 depot.install_link(link, &config.install_path)?;
22 }
23
24 Ok(())
25}