mirror of
https://github.com/uutils/coreutils
synced 2024-10-02 22:13:37 +00:00
Refactor and simplify build for utilities.
For coreutils, there are two build artifacts: 1. multicall executable (each utility is a separate static library) 2. individual utilities (still separate library with main wrapper) To avoid namespace collision, each utility crate is defined as "uu_{CMD}". The end user only sees the original utility name. This simplifies build.rs. Also, the thin wrapper for the main() function is no longer contained in the crate. It has been separated into a dedicated file. This was necessary to work around Cargo's need for the crate name attribute to match the name in the respective Cargo.toml.
This commit is contained in:
parent
d6039c1b22
commit
b90d253584
|
@ -177,5 +177,5 @@ rand="*"
|
|||
tempdir="*"
|
||||
|
||||
[[bin]]
|
||||
name="uutils"
|
||||
path="src/uutils/uutils.rs"
|
||||
name = "uutils"
|
||||
path = "src/uutils/uutils.rs"
|
||||
|
|
40
build.rs
40
build.rs
|
@ -12,49 +12,43 @@ pub fn main() {
|
|||
if val == "1" && key.starts_with(feature_prefix) {
|
||||
let krate = key[feature_prefix.len()..].to_lowercase();
|
||||
match krate.as_ref() {
|
||||
"default" | "unix" | "generic" => continue,
|
||||
_ => {},
|
||||
"default" | "unix" | "generic" => continue,
|
||||
_ => {},
|
||||
}
|
||||
crates.push(krate.to_string());
|
||||
}
|
||||
}
|
||||
crates.sort();
|
||||
|
||||
let mut cf = File::create(Path::new(&out_dir).join("uutils_crates.rs")).unwrap();
|
||||
let mut mf = File::create(Path::new(&out_dir).join("uutils_map.rs")).unwrap();
|
||||
|
||||
mf.write_all("
|
||||
type UtilityMap = HashMap<&'static str, fn(Vec<String>) -> i32>;
|
||||
|
||||
fn util_map() -> UtilityMap {
|
||||
let mut map: UtilityMap = HashMap::new();\n".as_bytes()).unwrap();
|
||||
|
||||
for krate in crates {
|
||||
match krate.as_ref() {
|
||||
"false" | "true" => {},
|
||||
"test" => cf.write_all(format!("extern crate uu{krate};\n", krate=krate).as_bytes()).unwrap(),
|
||||
_ => cf.write_all(format!("extern crate {krate} as uu{krate};\n", krate=krate).as_bytes()).unwrap(),
|
||||
}
|
||||
cf.write_all(format!("extern crate uu_{krate};\n", krate=krate).as_bytes()).unwrap();
|
||||
|
||||
match krate.as_ref() {
|
||||
"hashsum" => {
|
||||
mf.write_all("map.insert(\"hashsum\", uuhashsum::uumain);
|
||||
map.insert(\"md5sum\", uuhashsum::uumain);
|
||||
map.insert(\"sha1sum\", uuhashsum::uumain);
|
||||
map.insert(\"sha224sum\", uuhashsum::uumain);
|
||||
map.insert(\"sha256sum\", uuhashsum::uumain);
|
||||
map.insert(\"sha384sum\", uuhashsum::uumain);
|
||||
map.insert(\"sha512sum\", uuhashsum::uumain);\n".as_bytes()).unwrap();
|
||||
mf.write_all("map.insert(\"hashsum\", uu_hashsum::uumain);
|
||||
map.insert(\"md5sum\", uu_hashsum::uumain);
|
||||
map.insert(\"sha1sum\", uu_hashsum::uumain);
|
||||
map.insert(\"sha224sum\", uu_hashsum::uumain);
|
||||
map.insert(\"sha256sum\", uu_hashsum::uumain);
|
||||
map.insert(\"sha384sum\", uu_hashsum::uumain);
|
||||
map.insert(\"sha512sum\", uu_hashsum::uumain);\n".as_bytes()).unwrap();
|
||||
},
|
||||
"false" =>
|
||||
mf.write_all("fn uufalse(_: Vec<String>) -> i32 { 1 }
|
||||
map.insert(\"false\", uufalse as fn(Vec<String>) -> i32);\n".as_bytes()).unwrap(),
|
||||
"true" =>
|
||||
mf.write_all("fn uutrue(_: Vec<String>) -> i32 { 0 }
|
||||
map.insert(\"true\", uutrue as fn(Vec<String>) -> i32);\n".as_bytes()).unwrap(),
|
||||
_ =>
|
||||
mf.write_all(format!("map.insert(\"{krate}\", uu{krate}::uumain as fn(Vec<String>) -> i32);\n", krate= krate).as_bytes()).unwrap(),
|
||||
mf.write_all(format!("map.insert(\"{krate}\", uu_{krate}::uumain);\n", krate=krate).as_bytes()).unwrap(),
|
||||
}
|
||||
}
|
||||
mf.write_all("map
|
||||
}\n".as_bytes()).unwrap();
|
||||
|
||||
mf.write_all("map\n}\n".as_bytes()).unwrap();
|
||||
|
||||
cf.flush().unwrap();
|
||||
mf.flush().unwrap();
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "base64"
|
||||
name = "uu_base64"
|
||||
path = "base64.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -14,5 +14,5 @@ rustc-serialize = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="base64"
|
||||
path="base64.rs"
|
||||
name = "base64"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "base64"]
|
||||
#![crate_name = "uu_base64"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -159,8 +159,3 @@ fn help(opts: Options) {
|
|||
fn version() {
|
||||
println!("{} {}", NAME, VERSION);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/base64/main.rs
Normal file
5
src/base64/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_base64;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_base64::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "basename"
|
||||
name = "uu_basename"
|
||||
path = "basename.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="basename"
|
||||
path="basename.rs"
|
||||
name = "basename"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "basename"]
|
||||
#![crate_name = "uu_basename"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -105,8 +105,3 @@ fn strip_suffix(name: &str, suffix: &str) -> String {
|
|||
|
||||
name.to_string()
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/basename/main.rs
Normal file
5
src/basename/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_basename;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_basename::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "cat"
|
||||
name = "uu_cat"
|
||||
path = "cat.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="cat"
|
||||
path="cat.rs"
|
||||
name = "cat"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "cat"]
|
||||
#![crate_name = "uu_cat"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -339,10 +339,3 @@ impl<'a, W: Write> Drop for UnsafeWriter<'a, W> {
|
|||
let _ = self.flush_buf();
|
||||
}
|
||||
}
|
||||
|
||||
/* vim: set ai ts=4 sw=4 sts=4 et : */
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/cat/main.rs
Normal file
5
src/cat/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_cat;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_cat::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "chmod"
|
||||
name = "uu_chmod"
|
||||
path = "chmod.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -18,5 +18,5 @@ uucore = { path="../uucore" }
|
|||
walker = "*"
|
||||
|
||||
[[bin]]
|
||||
name="chmod"
|
||||
path="chmod.rs"
|
||||
name = "chmod"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "chmod"]
|
||||
#![crate_name = "uu_chmod"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -319,8 +319,3 @@ fn chmod_file(file: &Path, name: &str, changes: bool, quiet: bool, verbose: bool
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/chmod/main.rs
Normal file
5
src/chmod/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_chmod;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_chmod::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "chroot"
|
||||
name = "uu_chroot"
|
||||
path = "chroot.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="chroot"
|
||||
path="chroot.rs"
|
||||
name = "chroot"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "chroot"]
|
||||
#![crate_name = "uu_chroot"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -216,8 +216,3 @@ If $(SHELL) is not set, /bin/sh is used.", NAME, VERSION);
|
|||
|
||||
print!("{}", options.usage(&msg));
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/chroot/main.rs
Normal file
5
src/chroot/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_chroot;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_chroot::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "cksum"
|
||||
name = "uu_cksum"
|
||||
path = "cksum.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="cksum"
|
||||
path="cksum.rs"
|
||||
name = "cksum"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "cksum"]
|
||||
#![crate_name = "uu_cksum"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -128,8 +128,3 @@ Print CRC and size for each file.", NAME, VERSION);
|
|||
|
||||
exit_code
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/cksum/main.rs
Normal file
5
src/cksum/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_cksum;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_cksum::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "comm"
|
||||
name = "uu_comm"
|
||||
path = "comm.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -12,5 +12,5 @@ getopts = "*"
|
|||
libc = "*"
|
||||
|
||||
[[bin]]
|
||||
name="comm"
|
||||
path="comm.rs"
|
||||
name = "comm"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "comm"]
|
||||
#![crate_name = "uu_comm"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -163,8 +163,3 @@ Compare sorted files line by line.", NAME, VERSION);
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/comm/main.rs
Normal file
5
src/comm/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_comm;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_comm::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "cp"
|
||||
name = "uu_cp"
|
||||
path = "cp.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="cp"
|
||||
path="cp.rs"
|
||||
name = "cp"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "cp"]
|
||||
#![crate_name = "uu_cp"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -154,8 +154,3 @@ pub fn paths_refer_to_same_file(p1: &Path, p2: &Path) -> Result<bool> {
|
|||
|
||||
Ok(pathbuf1 == pathbuf2)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/cp/main.rs
Normal file
5
src/cp/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_cp;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_cp::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "cut"
|
||||
name = "uu_cut"
|
||||
path = "cut.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="cut"
|
||||
path="cut.rs"
|
||||
name = "cut"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "cut"]
|
||||
#![crate_name = "uu_cut"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -539,8 +539,3 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/cut/main.rs
Normal file
5
src/cut/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_cut;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_cut::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "dirname"
|
||||
name = "uu_dirname"
|
||||
path = "dirname.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -12,5 +12,5 @@ getopts = "*"
|
|||
libc = "*"
|
||||
|
||||
[[bin]]
|
||||
name="dirname"
|
||||
path="dirname.rs"
|
||||
name = "dirname"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "dirname"]
|
||||
#![crate_name = "uu_dirname"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -68,8 +68,3 @@ directory).", NAME, VERSION);
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/dirname/main.rs
Normal file
5
src/dirname/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_dirname;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_dirname::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "du"
|
||||
name = "uu_du"
|
||||
path = "du.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -14,5 +14,5 @@ time = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="du"
|
||||
path="du.rs"
|
||||
name = "du"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "du"]
|
||||
#![crate_name = "uu_du"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -395,8 +395,3 @@ Try '{} --help' for more information.", s, NAME);
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/du/main.rs
Normal file
5
src/du/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_du;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_du::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "echo"
|
||||
name = "uu_echo"
|
||||
path = "echo.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="echo"
|
||||
path="echo.rs"
|
||||
name = "echo"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "echo"]
|
||||
#![crate_name = "uu_echo"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -251,8 +251,3 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/echo/main.rs
Normal file
5
src/echo/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_echo;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_echo::uumain(std::env::args().collect()));
|
||||
}
|
6
src/env/Cargo.toml
vendored
6
src/env/Cargo.toml
vendored
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "env"
|
||||
name = "uu_env"
|
||||
path = "env.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="env"
|
||||
path="env.rs"
|
||||
name = "env"
|
||||
path = "main.rs"
|
||||
|
|
7
src/env/env.rs
vendored
7
src/env/env.rs
vendored
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "env"]
|
||||
#![crate_name = "uu_env"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -204,8 +204,3 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(env::args().collect()));
|
||||
}
|
||||
|
|
5
src/env/main.rs
vendored
Normal file
5
src/env/main.rs
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_env;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_env::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "expand"
|
||||
name = "uu_expand"
|
||||
path = "expand.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -14,5 +14,5 @@ unicode-width = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="expand"
|
||||
path="expand.rs"
|
||||
name = "expand"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "expand"]
|
||||
#![crate_name = "uu_expand"]
|
||||
#![feature(unicode)]
|
||||
|
||||
/*
|
||||
|
@ -241,8 +241,3 @@ fn expand(options: Options) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/expand/main.rs
Normal file
5
src/expand/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_expand;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_expand::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
[package]
|
||||
name = "expr"
|
||||
version = "0.0.1"
|
||||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "expr"
|
||||
name = "uu_expr"
|
||||
path = "expr.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -14,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="expr"
|
||||
path="expr.rs"
|
||||
name = "expr"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "expr"]
|
||||
#![crate_name = "uu_expr"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -61,8 +61,6 @@ fn evaluate_ast( maybe_ast: Result<Box<syntax_tree::ASTNode>, String> ) -> Resul
|
|||
else { maybe_ast.ok().unwrap().evaluate() }
|
||||
}
|
||||
|
||||
|
||||
|
||||
fn maybe_handle_help_or_version( args: &Vec<String> ) -> bool {
|
||||
if args.len() == 2 {
|
||||
if args[1] == "--help" { print_help(); true }
|
||||
|
@ -133,8 +131,3 @@ Environment variables:
|
|||
fn print_version() {
|
||||
println!("{} {}", NAME, VERSION);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/expr/main.rs
Normal file
5
src/expr/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_expr;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_expr::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "factor"
|
||||
name = "uu_factor"
|
||||
path = "factor.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -14,5 +14,5 @@ rand = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="factor"
|
||||
path="factor.rs"
|
||||
name = "factor"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "factor"]
|
||||
#![crate_name = "uu_factor"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -200,8 +200,3 @@ read from standard input.", NAME, VERSION);
|
|||
}
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/factor/main.rs
Normal file
5
src/factor/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_factor;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_factor::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "false"
|
||||
name = "uu_false"
|
||||
path = "false.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -12,5 +12,5 @@ getopts = "*"
|
|||
libc = "*"
|
||||
|
||||
[[bin]]
|
||||
name="false"
|
||||
path="false.rs"
|
||||
name = "false"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "false"]
|
||||
#![crate_name = "uu_false"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -12,8 +12,3 @@
|
|||
pub fn uumain(_: Vec<String>) -> i32 {
|
||||
1
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/false/main.rs
Normal file
5
src/false/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_false;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_false::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "fmt"
|
||||
name = "uu_fmt"
|
||||
path = "fmt.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -14,5 +14,5 @@ unicode-width = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="fmt"
|
||||
path="fmt.rs"
|
||||
name = "fmt"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "fmt"]
|
||||
#![crate_name = "uu_fmt"]
|
||||
#![feature(iter_cmp, str_char, unicode)]
|
||||
|
||||
/*
|
||||
|
@ -219,8 +219,3 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/fmt/main.rs
Normal file
5
src/fmt/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_fmt;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_fmt::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "fold"
|
||||
name = "uu_fold"
|
||||
path = "fold.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="fold"
|
||||
path="fold.rs"
|
||||
name = "fold"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "fold"]
|
||||
#![crate_name = "uu_fold"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -219,8 +219,3 @@ fn rfind_whitespace(slice: &str) -> Option<usize> {
|
|||
}
|
||||
None
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/fold/main.rs
Normal file
5
src/fold/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_fold;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_fold::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "groups"
|
||||
name = "uu_groups"
|
||||
path = "groups.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="groups"
|
||||
path="groups.rs"
|
||||
name = "groups"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "groups"]
|
||||
#![crate_name = "uu_groups"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -51,8 +51,3 @@ Prints the groups a user is in to standard output.", NAME, VERSION);
|
|||
|
||||
0
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/groups/main.rs
Normal file
5
src/groups/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_groups;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_groups::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "hashsum"
|
||||
name = "uu_hashsum"
|
||||
path = "hashsum.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -16,5 +16,5 @@ rust-crypto = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="hashsum"
|
||||
path="hashsum.rs"
|
||||
name = "hashsum"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "hashsum"]
|
||||
#![crate_name = "uu_hashsum"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -306,8 +306,3 @@ fn digest_reader<'a, T: Read>(digest: &mut Box<Digest+'a>, reader: &mut BufReade
|
|||
|
||||
Ok(digest.result_str())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/hashsum/main.rs
Normal file
5
src/hashsum/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_hashsum;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_hashsum::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "head"
|
||||
name = "uu_head"
|
||||
path = "head.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="head"
|
||||
path="head.rs"
|
||||
name = "head"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "head"]
|
||||
#![crate_name = "uu_head"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -207,8 +207,3 @@ fn head<T: Read>(reader: &mut BufReader<T>, settings: &Settings) -> bool {
|
|||
fn version() {
|
||||
println!("{} {}", NAME, VERSION);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/head/main.rs
Normal file
5
src/head/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_head;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_head::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "hostid"
|
||||
name = "uu_hostid"
|
||||
path = "hostid.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="hostid"
|
||||
path="hostid.rs"
|
||||
name = "hostid"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "hostid"]
|
||||
#![crate_name = "uu_hostid"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -87,8 +87,3 @@ fn hostid() {
|
|||
result &= 0xffffffff;
|
||||
println!("{:0>8x}", result);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/hostid/main.rs
Normal file
5
src/hostid/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_hostid;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_hostid::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "hostname"
|
||||
name = "uu_hostname"
|
||||
path = "hostname.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="hostname"
|
||||
path="hostname.rs"
|
||||
name = "hostname"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "hostname"]
|
||||
#![crate_name = "uu_hostname"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -174,8 +174,3 @@ fn xsethostname(name: &str) {
|
|||
println!("Cannot set hostname to {}", name);
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/hostname/main.rs
Normal file
5
src/hostname/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_hostname;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_hostname::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "id"
|
||||
name = "uu_id"
|
||||
path = "id.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="id"
|
||||
path="id.rs"
|
||||
name = "id"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "id"]
|
||||
#![crate_name = "uu_id"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -394,8 +394,3 @@ fn id_print(possible_pw: Option<c_passwd>, p_euid: bool, p_egid: bool) {
|
|||
|
||||
println!("");
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/id/main.rs
Normal file
5
src/id/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_id;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_id::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "kill"
|
||||
name = "uu_kill"
|
||||
path = "kill.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="kill"
|
||||
path="kill.rs"
|
||||
name = "kill"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "kill"]
|
||||
#![crate_name = "uu_kill"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -185,8 +185,3 @@ fn kill(signalname: &str, pids: std::vec::Vec<String>) -> i32 {
|
|||
}
|
||||
status
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/kill/main.rs
Normal file
5
src/kill/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_kill;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_kill::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "link"
|
||||
name = "uu_link"
|
||||
path = "link.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="link"
|
||||
path="link.rs"
|
||||
name = "link"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "link"]
|
||||
#![crate_name = "uu_link"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -63,8 +63,3 @@ Create a link named FILE2 to FILE1.", NAME, VERSION);
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/link/main.rs
Normal file
5
src/link/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_link;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_link::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "ln"
|
||||
name = "uu_ln"
|
||||
path = "ln.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="ln"
|
||||
path="ln.rs"
|
||||
name = "ln"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "ln"]
|
||||
#![crate_name = "uu_ln"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -326,8 +326,3 @@ pub fn is_symlink<P: AsRef<Path>>(path: P) -> bool {
|
|||
Err(_) => false
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/ln/main.rs
Normal file
5
src/ln/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_ln;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_ln::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "logname"
|
||||
name = "uu_logname"
|
||||
path = "logname.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="logname"
|
||||
path="logname.rs"
|
||||
name = "logname"
|
||||
path = "main.rs"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "logname"]
|
||||
#![crate_name = "uu_logname"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -80,8 +80,3 @@ fn exec() {
|
|||
None => println!("{}: no login name", NAME)
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
5
src/logname/main.rs
Normal file
5
src/logname/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_logname;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_logname::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "mkdir"
|
||||
name = "uu_mkdir"
|
||||
path = "mkdir.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="mkdir"
|
||||
path="mkdir.rs"
|
||||
name = "mkdir"
|
||||
path = "main.rs"
|
||||
|
|
5
src/mkdir/main.rs
Normal file
5
src/mkdir/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_mkdir;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_mkdir::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "mkdir"]
|
||||
#![crate_name = "uu_mkdir"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -155,8 +155,3 @@ fn mkdir(path: &Path, mode: u16, verbose: bool) -> i32 {
|
|||
}
|
||||
chmod(path, mode)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "mkfifo"
|
||||
name = "uu_mkfifo"
|
||||
path = "mkfifo.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="mkfifo"
|
||||
path="mkfifo.rs"
|
||||
name = "mkfifo"
|
||||
path = "main.rs"
|
||||
|
|
5
src/mkfifo/main.rs
Normal file
5
src/mkfifo/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_mkfifo;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_mkfifo::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "mkfifo"]
|
||||
#![crate_name = "uu_mkfifo"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -76,8 +76,3 @@ Create a FIFO with the given name.", NAME, VERSION);
|
|||
|
||||
exit_status
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "mv"
|
||||
name = "uu_mv"
|
||||
path = "mv.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -16,5 +16,5 @@ uucore = { path="../uucore" }
|
|||
time = "*"
|
||||
|
||||
[[bin]]
|
||||
name="mv"
|
||||
path="mv.rs"
|
||||
name = "mv"
|
||||
path = "main.rs"
|
||||
|
|
5
src/mv/main.rs
Normal file
5
src/mv/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_mv;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_mv::uumain(std::env::args().collect()));
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
#![crate_name = "mv"]
|
||||
#![crate_name = "uu_mv"]
|
||||
|
||||
/*
|
||||
* This file is part of the uutils coreutils package.
|
||||
|
@ -351,8 +351,3 @@ fn existing_backup_path(path: &PathBuf, suffix: &String) -> PathBuf {
|
|||
}
|
||||
simple_backup_path(path, suffix)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn main() {
|
||||
std::process::exit(uumain(std::env::args().collect()));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ version = "0.0.1"
|
|||
authors = []
|
||||
|
||||
[lib]
|
||||
name = "nice"
|
||||
name = "uu_nice"
|
||||
path = "nice.rs"
|
||||
|
||||
[dependencies]
|
||||
|
@ -13,5 +13,5 @@ libc = "*"
|
|||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name="nice"
|
||||
path="nice.rs"
|
||||
name = "nice"
|
||||
path = "main.rs"
|
||||
|
|
5
src/nice/main.rs
Normal file
5
src/nice/main.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
extern crate uu_nice;
|
||||
|
||||
fn main() {
|
||||
std::process::exit(uu_nice::uumain(std::env::args().collect()));
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue