hdexecutor 0.1.11

execute a HYDRAulic damnation represention of a program with a filesystem image
Documentation
use hdrepresentation::Program;
use hdexecutor::exec;
use std::env;
use std::io::{Error, ErrorKind};

fn main() -> Result<(), std::io::Error> {
    let args: Vec<String> = env::args().collect();
    if args.len() != 4 {
        eprintln!(
            "Usage: {} [deserialized program] [filesystem image] [filesystem type(i.e. ext4, btrfs)]",
            &args[0]
        );
        return Err(Error::new(ErrorKind::Other, "invalid arguments"));
    }
    if let Ok(f) = Program::from_path(&args[1]) {
    	exec(&f, args[2].clone(), args[3].clone())?;
    } else {
	return Err(Error::new(ErrorKind::Other, "invalid json"));
    }
    Ok(())
}