Start work on basic CLI features

+ Add basic logic for detecting conflicting configs, prompt to abort or
  continue
+ Create symlinks to configs
+ Basic usage is `kot path/to/dotfiles/`
+ Add `--backup-dir` option for setting directory for backing up configs
+ Default backup-dir to `backups/kapper` until finished testing
+ Add `--home-dir` option for setting location to install configs
+ Default home-dir setting to `dry-runs/kapper` until finished testing
This commit is contained in:
2021-09-28 18:54:37 -04:00
parent cb0e627a42
commit eadf1fd0a2
16 changed files with 490 additions and 6 deletions

View File

@@ -1,3 +1,26 @@
/*##############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2021 Shaun Reed, all rights reserved ##
## About: Main entry point for Linux configuration manager kot ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################*/
mod kot;
// =============================================================================
// MAIN ENTRY-POINT
// =============================================================================
// -----------------------------------------------------------------------------
fn main() {
println!("Hello, world!");
let args = kot::cli::from_args();
println!("args: {:?}\n", args);
match kot::install_configs(&args) {
Err(e) => println!("Error: {:?}\n+ Configs used: {:?}\n+ Install directory: {:?}\n",
e.kind(), args.configs_dir, args.install_dir),
Ok(()) => (),
}
}