init
This commit is contained in:
commit
43e20b46c7
5 changed files with 38 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasted"
|
||||||
|
version = "0.1.0"
|
8
Cargo.toml
Normal file
8
Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[package]
|
||||||
|
name = "wasted"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
1
rustfmt.toml
Normal file
1
rustfmt.toml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
hard_tabs = true
|
21
src/main.rs
Normal file
21
src/main.rs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
use std::{env, process::Command, time::SystemTime};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let start_time = SystemTime::now();
|
||||||
|
let args: Vec<String> = env::args().collect();
|
||||||
|
|
||||||
|
println!("{:?}", args);
|
||||||
|
if args.len() < 2 {
|
||||||
|
println!("Not enough arguments.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let cmd = &args[1];
|
||||||
|
|
||||||
|
println!("starting build");
|
||||||
|
let process = Command::new(cmd).args(&args[2..]).status();
|
||||||
|
|
||||||
|
println!("\n");
|
||||||
|
println!("{:?}", process);
|
||||||
|
let time_taken = start_time.elapsed().unwrap();
|
||||||
|
println!("Took {:?}", time_taken);
|
||||||
|
}
|
Loading…
Reference in a new issue