commit 952352a8a53e4be81bbd16f9fbc3889df13cba35 parent de934df4e829948e48718c647c7593491f12c651 Author: Stefan Koch <programming@stefan-koch.name> Date: Sat, 14 Sep 2019 19:00:03 +0200 clone git repo from first input argument Diffstat:
M | src/main.rs | | | 11 | +++++++++-- |
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs @@ -1,4 +1,11 @@ +use std::env; + fn main() { - // TODO: Entrypoint must be flexible - cinderella::run("https://github.com/aufziehvogel/CInderella.git") + let args: Vec<String> = env::args().collect(); + + if args.len() > 1 { + cinderella::run(&args[1]) + } else { + println!("Please specify the URL to a git repository"); + } }