1
0
Fork 0

Add LICENSE

This commit is contained in:
Daniele Tricoli 2019-01-23 02:13:04 +01:00
parent af79a56887
commit 2aa9784546
2 changed files with 26 additions and 3 deletions

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright © 2019 Daniele Tricoli <eriol@mornie.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,3 +1,6 @@
// Copyright © 2019 Daniele Tricoli <eriol@mornie.org>
// smbios-udid is licensed under the MIT License, see LICENSE.
use std::process;
use clap::{crate_authors, crate_version, App, Arg};
@ -5,14 +8,15 @@ use colored::Colorize;
use uuid::Uuid;
const ERROR_PARSING: &str = "An error occurred while parsing";
const UUID_ARG_NAME: &str = "UUID";
fn main() {
let matches = App::new("smbios-udid")
let matches = App::new("smbios-uuid")
.version(crate_version!())
.author(crate_authors!())
.about("")
.arg(
Arg::with_name("UUID")
Arg::with_name(UUID_ARG_NAME)
.help("The UUID to convert")
.required(true)
.index(1),
@ -20,7 +24,7 @@ fn main() {
.get_matches();
// We can unwrap because UUID is required.
let uuid = matches.value_of("UUID").unwrap();
let uuid = matches.value_of(UUID_ARG_NAME).unwrap();
let uuid = match Uuid::parse_str(uuid) {
Ok(uuid) => uuid,
Err(err) => {