Browse Source

Run repositories and groups

Samuel W. Flint 3 years ago
parent
commit
108bf30195
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/lib/run.rs

+ 7 - 1
src/lib/run.rs

@@ -9,7 +9,13 @@ use std::collections::HashMap;
 
 pub fn run(config: &Config, names: Values<'_>) {
     for name in names {
-        println!("Running {}...", name)
+        if config.repositories.contains_key(name) {
+            run_repository_sync(&config, name.to_string());
+        } else if config.groups.contains_key(name) {
+            run_group(&config, name.to_string());
+        } else {
+            println!("\"{}\" is neither a group nor a repository.", name);
+        }
     }
 }