summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorHenrique Alves <henriquelalves@gmail.com>2022-07-31 16:41:27 -0300
committerHenrique Alves <henriquelalves@gmail.com>2022-07-31 16:41:27 -0300
commitaad48aa44646905d4fab8c51770a5d932360fda4 (patch)
treea7f18f94e339ff850234d4b86c2881ed757c1ced /src/main.rs
parent64dcbcb51c79bd8e272b7af9cfb838d3bca2a8bf (diff)
downloadglam-aad48aa44646905d4fab8c51770a5d932360fda4.tar.gz
glam-aad48aa44646905d4fab8c51770a5d932360fda4.tar.bz2
glam-aad48aa44646905d4fab8c51770a5d932360fda4.zip
Add no_copy flag
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/main.rs b/src/main.rs
index 6bd6410..8584779 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -31,28 +31,25 @@ enum Commands {
/// Install all packages on .glam file
Install {
- // TODO: no_copy flag
- //// Don't copy to target folder
- // #[clap(short, long, required = false, takes_value = false)]
- // no_copy: bool,
+ /// Don't copy to target folder
+ #[clap(short, long, required = false, takes_value = false)]
+ no_copy: bool,
},
/// Update a single GLAM package
UpdatePackage {
/// Name of the package to update (default is all packages)
package_name: String,
- // TODO: no_copy flag
- //// Don't copy to target folder
- // #[clap(short, long, required = false, takes_value = false)]
- // no_copy: bool,
+ /// Don't copy to target folder
+ #[clap(short, long, required = false, takes_value = false)]
+ no_copy: bool,
},
/// Update all GLAM packages
Update {
- // TODO: no_copy flag
- //// Don't copy to target folder
- // #[clap(short, long, required = false, takes_value = false)]
- // no_copy: bool,
+ /// Don't copy to target folder
+ #[clap(short, long, required = false, takes_value = false)]
+ no_copy: bool,
},
/// Remove a GLAM package
@@ -86,25 +83,25 @@ fn main() {
commands::install_package(&root, git_repo, commit, !*no_copy, cli.verbose);
},
- Commands::Install { } => {
+ Commands::Install { no_copy } => {
let root = commands::search_project_root();
commands::check_ignores(&root);
commands::initialize_glam_files(&root);
- commands::install_all_packages(&root, cli.verbose);
+ commands::install_all_packages(&root, cli.verbose, !*no_copy);
},
- Commands::UpdatePackage { package_name } => {
+ Commands::UpdatePackage { package_name, no_copy } => {
let root = commands::search_project_root();
commands::check_ignores(&root);
commands::initialize_glam_files(&root);
- commands::update_package(&root, &package_name, cli.verbose);
+ commands::update_package(&root, &package_name, cli.verbose, !*no_copy);
},
- Commands::Update {} => {
+ Commands::Update { no_copy } => {
let root = commands::search_project_root();
commands::check_ignores(&root);
commands::initialize_glam_files(&root);
- commands::update_all_packages(&root, cli.verbose);
+ commands::update_all_packages(&root, cli.verbose, !*no_copy);
},
Commands::RemovePackage {package_name} => {