mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
change ~ make all sub-crates independent
This commit is contained in:
parent
68bea8d81d
commit
db2e950918
305 changed files with 1319 additions and 1517 deletions
189
Cargo.toml
189
Cargo.toml
|
@ -218,100 +218,100 @@ lazy_static = { version="1.3" }
|
||||||
textwrap = { version="=0.11.0", features=["term_size"] } # !maint: [2020-05-10; rivy] unstable crate using undocumented features; pinned currently, will review
|
textwrap = { version="=0.11.0", features=["term_size"] } # !maint: [2020-05-10; rivy] unstable crate using undocumented features; pinned currently, will review
|
||||||
uucore = { version="0.0.2", package="uucore", git="https://github.com/uutils/uucore.git", branch="master" }
|
uucore = { version="0.0.2", package="uucore", git="https://github.com/uutils/uucore.git", branch="master" }
|
||||||
# * uutils
|
# * uutils
|
||||||
arch = { optional=true, path="src/uu/arch" }
|
arch = { optional=true, version="0.0.1", package="uu_arch", path="src/uu/arch" }
|
||||||
base32 = { optional=true, path="src/uu/base32" }
|
base32 = { optional=true, version="0.0.1", package="uu_base32", path="src/uu/base32" }
|
||||||
base64 = { optional=true, path="src/uu/base64" }
|
base64 = { optional=true, version="0.0.1", package="uu_base64", path="src/uu/base64" }
|
||||||
basename = { optional=true, path="src/uu/basename" }
|
basename = { optional=true, version="0.0.1", package="uu_basename", path="src/uu/basename" }
|
||||||
cat = { optional=true, path="src/uu/cat" }
|
cat = { optional=true, version="0.0.1", package="uu_cat", path="src/uu/cat" }
|
||||||
chgrp = { optional=true, path="src/uu/chgrp" }
|
chgrp = { optional=true, version="0.0.1", package="uu_chgrp", path="src/uu/chgrp" }
|
||||||
chmod = { optional=true, path="src/uu/chmod" }
|
chmod = { optional=true, version="0.0.1", package="uu_chmod", path="src/uu/chmod" }
|
||||||
chown = { optional=true, path="src/uu/chown" }
|
chown = { optional=true, version="0.0.1", package="uu_chown", path="src/uu/chown" }
|
||||||
chroot = { optional=true, path="src/uu/chroot" }
|
chroot = { optional=true, version="0.0.1", package="uu_chroot", path="src/uu/chroot" }
|
||||||
cksum = { optional=true, path="src/uu/cksum" }
|
cksum = { optional=true, version="0.0.1", package="uu_cksum", path="src/uu/cksum" }
|
||||||
comm = { optional=true, path="src/uu/comm" }
|
comm = { optional=true, version="0.0.1", package="uu_comm", path="src/uu/comm" }
|
||||||
cp = { optional=true, path="src/uu/cp" }
|
cp = { optional=true, version="0.0.1", package="uu_cp", path="src/uu/cp" }
|
||||||
cut = { optional=true, path="src/uu/cut" }
|
cut = { optional=true, version="0.0.1", package="uu_cut", path="src/uu/cut" }
|
||||||
date = { optional=true, path="src/uu/date" }
|
date = { optional=true, version="0.0.1", package="uu_date", path="src/uu/date" }
|
||||||
df = { optional=true, path="src/uu/df" }
|
df = { optional=true, version="0.0.1", package="uu_df", path="src/uu/df" }
|
||||||
dircolors= { optional=true, path="src/uu/dircolors" }
|
dircolors= { optional=true, version="0.0.1", package="uu_dircolors", path="src/uu/dircolors" }
|
||||||
dirname = { optional=true, path="src/uu/dirname" }
|
dirname = { optional=true, version="0.0.1", package="uu_dirname", path="src/uu/dirname" }
|
||||||
du = { optional=true, path="src/uu/du" }
|
du = { optional=true, version="0.0.1", package="uu_du", path="src/uu/du" }
|
||||||
echo = { optional=true, path="src/uu/echo" }
|
echo = { optional=true, version="0.0.1", package="uu_echo", path="src/uu/echo" }
|
||||||
env = { optional=true, path="src/uu/env" }
|
env = { optional=true, version="0.0.1", package="uu_env", path="src/uu/env" }
|
||||||
expand = { optional=true, path="src/uu/expand" }
|
expand = { optional=true, version="0.0.1", package="uu_expand", path="src/uu/expand" }
|
||||||
expr = { optional=true, path="src/uu/expr" }
|
expr = { optional=true, version="0.0.1", package="uu_expr", path="src/uu/expr" }
|
||||||
factor = { optional=true, path="src/uu/factor" }
|
factor = { optional=true, version="0.0.1", package="uu_factor", path="src/uu/factor" }
|
||||||
false = { optional=true, path="src/uu/false" }
|
false = { optional=true, version="0.0.1", package="uu_false", path="src/uu/false" }
|
||||||
fmt = { optional=true, path="src/uu/fmt" }
|
fmt = { optional=true, version="0.0.1", package="uu_fmt", path="src/uu/fmt" }
|
||||||
fold = { optional=true, path="src/uu/fold" }
|
fold = { optional=true, version="0.0.1", package="uu_fold", path="src/uu/fold" }
|
||||||
groups = { optional=true, path="src/uu/groups" }
|
groups = { optional=true, version="0.0.1", package="uu_groups", path="src/uu/groups" }
|
||||||
hashsum = { optional=true, path="src/uu/hashsum" }
|
hashsum = { optional=true, version="0.0.1", package="uu_hashsum", path="src/uu/hashsum" }
|
||||||
head = { optional=true, path="src/uu/head" }
|
head = { optional=true, version="0.0.1", package="uu_head", path="src/uu/head" }
|
||||||
hostid = { optional=true, path="src/uu/hostid" }
|
hostid = { optional=true, version="0.0.1", package="uu_hostid", path="src/uu/hostid" }
|
||||||
hostname = { optional=true, path="src/uu/hostname" }
|
hostname = { optional=true, version="0.0.1", package="uu_hostname", path="src/uu/hostname" }
|
||||||
id = { optional=true, path="src/uu/id" }
|
id = { optional=true, version="0.0.1", package="uu_id", path="src/uu/id" }
|
||||||
install = { optional=true, path="src/uu/install" }
|
install = { optional=true, version="0.0.1", package="uu_install", path="src/uu/install" }
|
||||||
join = { optional=true, path="src/uu/join" }
|
join = { optional=true, version="0.0.1", package="uu_join", path="src/uu/join" }
|
||||||
kill = { optional=true, path="src/uu/kill" }
|
kill = { optional=true, version="0.0.1", package="uu_kill", path="src/uu/kill" }
|
||||||
link = { optional=true, path="src/uu/link" }
|
link = { optional=true, version="0.0.1", package="uu_link", path="src/uu/link" }
|
||||||
ln = { optional=true, path="src/uu/ln" }
|
ln = { optional=true, version="0.0.1", package="uu_ln", path="src/uu/ln" }
|
||||||
ls = { optional=true, path="src/uu/ls" }
|
ls = { optional=true, version="0.0.1", package="uu_ls", path="src/uu/ls" }
|
||||||
logname = { optional=true, path="src/uu/logname" }
|
logname = { optional=true, version="0.0.1", package="uu_logname", path="src/uu/logname" }
|
||||||
mkdir = { optional=true, path="src/uu/mkdir" }
|
mkdir = { optional=true, version="0.0.1", package="uu_mkdir", path="src/uu/mkdir" }
|
||||||
mkfifo = { optional=true, path="src/uu/mkfifo" }
|
mkfifo = { optional=true, version="0.0.1", package="uu_mkfifo", path="src/uu/mkfifo" }
|
||||||
mknod = { optional=true, path="src/uu/mknod" }
|
mknod = { optional=true, version="0.0.1", package="uu_mknod", path="src/uu/mknod" }
|
||||||
mktemp = { optional=true, path="src/uu/mktemp" }
|
mktemp = { optional=true, version="0.0.1", package="uu_mktemp", path="src/uu/mktemp" }
|
||||||
more = { optional=true, path="src/uu/more" }
|
more = { optional=true, version="0.0.1", package="uu_more", path="src/uu/more" }
|
||||||
mv = { optional=true, path="src/uu/mv" }
|
mv = { optional=true, version="0.0.1", package="uu_mv", path="src/uu/mv" }
|
||||||
nice = { optional=true, path="src/uu/nice" }
|
nice = { optional=true, version="0.0.1", package="uu_nice", path="src/uu/nice" }
|
||||||
nl = { optional=true, path="src/uu/nl" }
|
nl = { optional=true, version="0.0.1", package="uu_nl", path="src/uu/nl" }
|
||||||
nohup = { optional=true, path="src/uu/nohup" }
|
nohup = { optional=true, version="0.0.1", package="uu_nohup", path="src/uu/nohup" }
|
||||||
nproc = { optional=true, path="src/uu/nproc" }
|
nproc = { optional=true, version="0.0.1", package="uu_nproc", path="src/uu/nproc" }
|
||||||
numfmt = { optional=true, path="src/uu/numfmt" }
|
numfmt = { optional=true, version="0.0.1", package="uu_numfmt", path="src/uu/numfmt" }
|
||||||
od = { optional=true, path="src/uu/od" }
|
od = { optional=true, version="0.0.1", package="uu_od", path="src/uu/od" }
|
||||||
paste = { optional=true, path="src/uu/paste" }
|
paste = { optional=true, version="0.0.1", package="uu_paste", path="src/uu/paste" }
|
||||||
pathchk = { optional=true, path="src/uu/pathchk" }
|
pathchk = { optional=true, version="0.0.1", package="uu_pathchk", path="src/uu/pathchk" }
|
||||||
pinky = { optional=true, path="src/uu/pinky" }
|
pinky = { optional=true, version="0.0.1", package="uu_pinky", path="src/uu/pinky" }
|
||||||
printenv = { optional=true, path="src/uu/printenv" }
|
printenv = { optional=true, version="0.0.1", package="uu_printenv", path="src/uu/printenv" }
|
||||||
printf = { optional=true, path="src/uu/printf" }
|
printf = { optional=true, version="0.0.1", package="uu_printf", path="src/uu/printf" }
|
||||||
ptx = { optional=true, path="src/uu/ptx" }
|
ptx = { optional=true, version="0.0.1", package="uu_ptx", path="src/uu/ptx" }
|
||||||
pwd = { optional=true, path="src/uu/pwd" }
|
pwd = { optional=true, version="0.0.1", package="uu_pwd", path="src/uu/pwd" }
|
||||||
readlink = { optional=true, path="src/uu/readlink" }
|
readlink = { optional=true, version="0.0.1", package="uu_readlink", path="src/uu/readlink" }
|
||||||
realpath = { optional=true, path="src/uu/realpath" }
|
realpath = { optional=true, version="0.0.1", package="uu_realpath", path="src/uu/realpath" }
|
||||||
relpath = { optional=true, path="src/uu/relpath" }
|
relpath = { optional=true, version="0.0.1", package="uu_relpath", path="src/uu/relpath" }
|
||||||
rm = { optional=true, path="src/uu/rm" }
|
rm = { optional=true, version="0.0.1", package="uu_rm", path="src/uu/rm" }
|
||||||
rmdir = { optional=true, path="src/uu/rmdir" }
|
rmdir = { optional=true, version="0.0.1", package="uu_rmdir", path="src/uu/rmdir" }
|
||||||
seq = { optional=true, path="src/uu/seq" }
|
seq = { optional=true, version="0.0.1", package="uu_seq", path="src/uu/seq" }
|
||||||
shred = { optional=true, path="src/uu/shred" }
|
shred = { optional=true, version="0.0.1", package="uu_shred", path="src/uu/shred" }
|
||||||
shuf = { optional=true, path="src/uu/shuf" }
|
shuf = { optional=true, version="0.0.1", package="uu_shuf", path="src/uu/shuf" }
|
||||||
sleep = { optional=true, path="src/uu/sleep" }
|
sleep = { optional=true, version="0.0.1", package="uu_sleep", path="src/uu/sleep" }
|
||||||
sort = { optional=true, path="src/uu/sort" }
|
sort = { optional=true, version="0.0.1", package="uu_sort", path="src/uu/sort" }
|
||||||
split = { optional=true, path="src/uu/split" }
|
split = { optional=true, version="0.0.1", package="uu_split", path="src/uu/split" }
|
||||||
stat = { optional=true, path="src/uu/stat" }
|
stat = { optional=true, version="0.0.1", package="uu_stat", path="src/uu/stat" }
|
||||||
stdbuf = { optional=true, path="src/uu/stdbuf" }
|
stdbuf = { optional=true, version="0.0.1", package="uu_stdbuf", path="src/uu/stdbuf" }
|
||||||
sum = { optional=true, path="src/uu/sum" }
|
sum = { optional=true, version="0.0.1", package="uu_sum", path="src/uu/sum" }
|
||||||
sync = { optional=true, path="src/uu/sync" }
|
sync = { optional=true, version="0.0.1", package="uu_sync", path="src/uu/sync" }
|
||||||
tac = { optional=true, path="src/uu/tac" }
|
tac = { optional=true, version="0.0.1", package="uu_tac", path="src/uu/tac" }
|
||||||
tail = { optional=true, path="src/uu/tail" }
|
tail = { optional=true, version="0.0.1", package="uu_tail", path="src/uu/tail" }
|
||||||
tee = { optional=true, path="src/uu/tee" }
|
tee = { optional=true, version="0.0.1", package="uu_tee", path="src/uu/tee" }
|
||||||
test = { optional=true, path="src/uu/test" }
|
test = { optional=true, version="0.0.1", package="uu_test", path="src/uu/test" }
|
||||||
timeout = { optional=true, path="src/uu/timeout" }
|
timeout = { optional=true, version="0.0.1", package="uu_timeout", path="src/uu/timeout" }
|
||||||
touch = { optional=true, path="src/uu/touch" }
|
touch = { optional=true, version="0.0.1", package="uu_touch", path="src/uu/touch" }
|
||||||
tr = { optional=true, path="src/uu/tr" }
|
tr = { optional=true, version="0.0.1", package="uu_tr", path="src/uu/tr" }
|
||||||
true = { optional=true, path="src/uu/true" }
|
true = { optional=true, version="0.0.1", package="uu_true", path="src/uu/true" }
|
||||||
truncate = { optional=true, path="src/uu/truncate" }
|
truncate = { optional=true, version="0.0.1", package="uu_truncate", path="src/uu/truncate" }
|
||||||
tsort = { optional=true, path="src/uu/tsort" }
|
tsort = { optional=true, version="0.0.1", package="uu_tsort", path="src/uu/tsort" }
|
||||||
tty = { optional=true, path="src/uu/tty" }
|
tty = { optional=true, version="0.0.1", package="uu_tty", path="src/uu/tty" }
|
||||||
uname = { optional=true, path="src/uu/uname" }
|
uname = { optional=true, version="0.0.1", package="uu_uname", path="src/uu/uname" }
|
||||||
unexpand = { optional=true, path="src/uu/unexpand" }
|
unexpand = { optional=true, version="0.0.1", package="uu_unexpand", path="src/uu/unexpand" }
|
||||||
uniq = { optional=true, path="src/uu/uniq" }
|
uniq = { optional=true, version="0.0.1", package="uu_uniq", path="src/uu/uniq" }
|
||||||
unlink = { optional=true, path="src/uu/unlink" }
|
unlink = { optional=true, version="0.0.1", package="uu_unlink", path="src/uu/unlink" }
|
||||||
uptime = { optional=true, path="src/uu/uptime" }
|
uptime = { optional=true, version="0.0.1", package="uu_uptime", path="src/uu/uptime" }
|
||||||
users = { optional=true, path="src/uu/users" }
|
users = { optional=true, version="0.0.1", package="uu_users", path="src/uu/users" }
|
||||||
wc = { optional=true, path="src/uu/wc" }
|
wc = { optional=true, version="0.0.1", package="uu_wc", path="src/uu/wc" }
|
||||||
who = { optional=true, path="src/uu/who" }
|
who = { optional=true, version="0.0.1", package="uu_who", path="src/uu/who" }
|
||||||
whoami = { optional=true, path="src/uu/whoami" }
|
whoami = { optional=true, version="0.0.1", package="uu_whoami", path="src/uu/whoami" }
|
||||||
yes = { optional=true, path="src/uu/yes" }
|
yes = { optional=true, version="0.0.1", package="uu_yes", path="src/uu/yes" }
|
||||||
#
|
#
|
||||||
# * transitive dependency via 'failure'; pin to <= v0.3.30 to avoid increasing MinSRV to v1.33.0
|
# * transitive dependency via 'failure'; pin to <= v0.3.30 to avoid increasing MinSRV to v1.33.0
|
||||||
_backtrace = { version=">= 0.3.3, <= 0.3.30", package="backtrace" }
|
_backtrace = { version=">= 0.3.3, <= 0.3.30", package="backtrace" }
|
||||||
|
@ -324,6 +324,7 @@ regex = "1.0"
|
||||||
tempdir = "0.3"
|
tempdir = "0.3"
|
||||||
time = "0.1"
|
time = "0.1"
|
||||||
unindent = "0.1"
|
unindent = "0.1"
|
||||||
|
uucore = { version="0.0.2", package="uucore", git="https://github.com/uutils/uucore.git", branch="master", features=["entries"] }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dev-dependencies]
|
[target.'cfg(unix)'.dev-dependencies]
|
||||||
rust-users = { version="0.10", package="users" }
|
rust-users = { version="0.10", package="users" }
|
||||||
|
|
112
build.rs
112
build.rs
|
@ -1,3 +1,6 @@
|
||||||
|
// spell-checker:ignore (utils) chgrp chmod chown chroot cksum dircolors hashsum hostid logname mkdir mkfifo mknod mktemp nohup nproc numfmt pathchk printenv printf readlink realpath relpath rmdir shuf stdbuf tsort uname unexpand whoami
|
||||||
|
// spell-checker:ignore () uutils uumain rustfmt rustc macos krate
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
@ -40,30 +43,99 @@ pub fn main() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
for krate in crates {
|
for krate in crates {
|
||||||
cf.write_all(format!("extern crate uu_{krate};\n", krate = krate).as_bytes())
|
match krate.as_ref() {
|
||||||
.unwrap();
|
"arch"
|
||||||
|
| "base32" | "base64" | "basename"
|
||||||
|
| "cat" | "chgrp" | "chmod" | "chown" | "chroot" | "cksum" | "comm" | "cp" | "cut"
|
||||||
|
| "date" | "df" | "dircolors" | "dirname" | "du"
|
||||||
|
| "echo" | "env" | "expand" | "expr"
|
||||||
|
| "factor" | "fmt" | "fold"
|
||||||
|
| "groups"
|
||||||
|
| "head" | "hostid" | "hostname"
|
||||||
|
| "id" | "install"
|
||||||
|
| "join"
|
||||||
|
| "kill"
|
||||||
|
| "link" | "ln" | "logname" | "ls"
|
||||||
|
| "mkdir" | "mkfifo" | "mknod" | "mktemp" | "more" | "mv"
|
||||||
|
| "nice" | "nl" | "nohup" | "nproc" | "numfmt"
|
||||||
|
| "od"
|
||||||
|
| "paste" | "pathchk" | "pinky" | "printenv" | "printf" | "ptx" | "pwd"
|
||||||
|
| "readlink" | "realpath" | "relpath" | "rm" | "rmdir"
|
||||||
|
| "seq" | "shred" | "shuf" | "sleep" | "sort" | "split" | "stat" | "stdbuf" | "sum" | "sync"
|
||||||
|
| "tac" | "tail" | "tee" | "test" | "timeout" | "touch" | "tr" | "truncate" | "tsort" | "tty"
|
||||||
|
| "uname" | "unexpand" | "uniq" | "unlink" | "uptime" | "users"
|
||||||
|
| "wc" | "who" | "whoami"
|
||||||
|
| "yes"
|
||||||
|
| "false" | "true"
|
||||||
|
| "hashsum"
|
||||||
|
=> {
|
||||||
|
// cf.write_all(format!("extern crate {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() {
|
match krate.as_ref() {
|
||||||
"hashsum" => {
|
"arch"
|
||||||
mf.write_all(
|
| "base32" | "base64" | "basename"
|
||||||
"map.insert(\"hashsum\", uu_hashsum::uumain);
|
| "cat" | "chgrp" | "chmod" | "chown" | "chroot" | "cksum" | "comm" | "cp" | "cut"
|
||||||
map.insert(\"md5sum\", uu_hashsum::uumain);
|
| "date" | "df" | "dircolors" | "dirname" | "du"
|
||||||
map.insert(\"sha1sum\", uu_hashsum::uumain);
|
| "echo" | "env" | "expand" | "expr"
|
||||||
map.insert(\"sha224sum\", uu_hashsum::uumain);
|
| "factor" | "fmt" | "fold"
|
||||||
map.insert(\"sha256sum\", uu_hashsum::uumain);
|
| "groups"
|
||||||
map.insert(\"sha384sum\", uu_hashsum::uumain);
|
| "head" | "hostid" | "hostname"
|
||||||
map.insert(\"sha512sum\", uu_hashsum::uumain);
|
| "id" | "install"
|
||||||
map.insert(\"sha3sum\", uu_hashsum::uumain);
|
| "join"
|
||||||
map.insert(\"sha3-224sum\", uu_hashsum::uumain);
|
| "kill"
|
||||||
map.insert(\"sha3-256sum\", uu_hashsum::uumain);
|
| "link" | "ln" | "logname" | "ls"
|
||||||
map.insert(\"sha3-384sum\", uu_hashsum::uumain);
|
| "mkdir" | "mkfifo" | "mknod" | "mktemp" | "more" | "mv"
|
||||||
map.insert(\"sha3-512sum\", uu_hashsum::uumain);
|
| "nice" | "nl" | "nohup" | "nproc" | "numfmt"
|
||||||
map.insert(\"shake128sum\", uu_hashsum::uumain);
|
| "od"
|
||||||
map.insert(\"shake256sum\", uu_hashsum::uumain);\n"
|
| "paste" | "pathchk" | "pinky" | "printenv" | "printf" | "ptx" | "pwd"
|
||||||
|
| "readlink" | "realpath" | "relpath" | "rm" | "rmdir"
|
||||||
|
| "seq" | "shred" | "shuf" | "sleep" | "sort" | "split" | "stat" | "stdbuf" | "sum" | "sync"
|
||||||
|
| "tac" | "tail" | "tee" | "test" | "timeout" | "touch" | "tr" | "truncate" | "tsort" | "tty"
|
||||||
|
| "uname" | "unexpand" | "uniq" | "unlink" | "uptime" | "users"
|
||||||
|
| "wc" | "who" | "whoami"
|
||||||
|
| "yes"
|
||||||
|
=> mf
|
||||||
|
.write_all(
|
||||||
|
format!("map.insert(\"{krate}\", {krate}::uumain);\n", krate = krate)
|
||||||
.as_bytes(),
|
.as_bytes(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap(),
|
||||||
}
|
"false" | "true" => mf
|
||||||
|
.write_all(
|
||||||
|
format!("map.insert(\"{krate}\", r#{krate}::uumain);\n", krate = krate)
|
||||||
|
.as_bytes(),
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
|
"hashsum" => mf
|
||||||
|
.write_all(
|
||||||
|
format!(
|
||||||
|
"
|
||||||
|
map.insert(\"{krate}\", {krate}::uumain);
|
||||||
|
map.insert(\"md5sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha1sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha224sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha256sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha384sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha512sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha3sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha3-224sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha3-256sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha3-384sum\", {krate}::uumain);
|
||||||
|
map.insert(\"sha3-512sum\", {krate}::uumain);
|
||||||
|
map.insert(\"shake128sum\", {krate}::uumain);
|
||||||
|
map.insert(\"shake256sum\", {krate}::uumain);\n",
|
||||||
|
krate = krate
|
||||||
|
)
|
||||||
|
.as_bytes(),
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
_ => mf
|
_ => mf
|
||||||
.write_all(
|
.write_all(
|
||||||
format!(
|
format!(
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "arch"
|
name = "uu_arch"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_arch"
|
|
||||||
path = "src/arch.rs"
|
path = "src/arch.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
platform-info = "0.0.1"
|
platform-info = "0.0.1"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "arch"
|
name = "arch"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![crate_name = "uu_arch"]
|
|
||||||
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Smigle00 <smigle00@gmail.com>
|
// (c) Smigle00 <smigle00@gmail.com>
|
||||||
|
@ -7,7 +5,6 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//
|
|
||||||
|
|
||||||
extern crate platform_info;
|
extern crate platform_info;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
1
src/uu/arch/src/main.rs
Normal file
1
src/uu/arch/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_arch); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "base32"
|
name = "uu_base32"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_base32"
|
|
||||||
path = "src/base32.rs"
|
path = "src/base32.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = { version = "0.0.2", features = ["encoding"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features = ["encoding"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
## optional
|
## optional
|
||||||
clippy = { version = "0.0.212", optional = true }
|
clippy = { version = "0.0.212", optional = true }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "base32"
|
name = "base32"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -4,15 +4,11 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE file
|
// For the full copyright and license information, please view the LICENSE file
|
||||||
// that was distributed with this source code.
|
// that was distributed with this source code.
|
||||||
//
|
|
||||||
|
|
||||||
#![crate_name = "uu_base32"]
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
use uucore::encoding::Format;
|
use uucore::encoding::Format;
|
||||||
|
|
||||||
#[path = "../../base64/src/base_common.rs"]
|
|
||||||
mod base_common;
|
mod base_common;
|
||||||
|
|
||||||
static SYNTAX: &str = "[OPTION]... [FILE]";
|
static SYNTAX: &str = "[OPTION]... [FILE]";
|
||||||
|
|
93
src/uu/base32/src/base_common.rs
Normal file
93
src/uu/base32/src/base_common.rs
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
|
// (c) Jordy Dickinson <jordy.dickinson@gmail.com>
|
||||||
|
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
||||||
|
// (c) Alex Lyon <arcterus@mail.com>
|
||||||
|
//
|
||||||
|
// For the full copyright and license information, please view the LICENSE file
|
||||||
|
// that was distributed with this source code.
|
||||||
|
|
||||||
|
use uucore;
|
||||||
|
use uucore::encoding::{wrap_print, Data, Format};
|
||||||
|
|
||||||
|
use std::fs::File;
|
||||||
|
use std::io::{stdin, BufReader, Read};
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
|
pub fn execute(
|
||||||
|
args: Vec<String>,
|
||||||
|
syntax: &str,
|
||||||
|
summary: &str,
|
||||||
|
long_help: &str,
|
||||||
|
format: Format,
|
||||||
|
) -> i32 {
|
||||||
|
let matches = new_coreopts!(syntax, summary, long_help)
|
||||||
|
.optflag("d", "decode", "decode data")
|
||||||
|
.optflag(
|
||||||
|
"i",
|
||||||
|
"ignore-garbage",
|
||||||
|
"when decoding, ignore non-alphabetic characters",
|
||||||
|
)
|
||||||
|
.optopt(
|
||||||
|
"w",
|
||||||
|
"wrap",
|
||||||
|
"wrap encoded lines after COLS character (default 76, 0 to disable wrapping)",
|
||||||
|
"COLS",
|
||||||
|
)
|
||||||
|
.parse(args);
|
||||||
|
|
||||||
|
let line_wrap = matches.opt_str("wrap").map(|s| match s.parse() {
|
||||||
|
Ok(n) => n,
|
||||||
|
Err(e) => {
|
||||||
|
crash!(1, "invalid wrap size: ‘{}’: {}", s, e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let ignore_garbage = matches.opt_present("ignore-garbage");
|
||||||
|
let decode = matches.opt_present("decode");
|
||||||
|
|
||||||
|
if matches.free.len() > 1 {
|
||||||
|
disp_err!("extra operand ‘{}’", matches.free[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if matches.free.is_empty() || &matches.free[0][..] == "-" {
|
||||||
|
let stdin_raw = stdin();
|
||||||
|
handle_input(
|
||||||
|
&mut stdin_raw.lock(),
|
||||||
|
format,
|
||||||
|
line_wrap,
|
||||||
|
ignore_garbage,
|
||||||
|
decode,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
let path = Path::new(matches.free[0].as_str());
|
||||||
|
let file_buf = safe_unwrap!(File::open(&path));
|
||||||
|
let mut input = BufReader::new(file_buf);
|
||||||
|
handle_input(&mut input, format, line_wrap, ignore_garbage, decode);
|
||||||
|
};
|
||||||
|
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
fn handle_input<R: Read>(
|
||||||
|
input: &mut R,
|
||||||
|
format: Format,
|
||||||
|
line_wrap: Option<usize>,
|
||||||
|
ignore_garbage: bool,
|
||||||
|
decode: bool,
|
||||||
|
) {
|
||||||
|
let mut data = Data::new(input, format).ignore_garbage(ignore_garbage);
|
||||||
|
if let Some(wrap) = line_wrap {
|
||||||
|
data = data.line_wrap(wrap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if !decode {
|
||||||
|
let encoded = data.encode();
|
||||||
|
wrap_print(&data, encoded);
|
||||||
|
} else {
|
||||||
|
match data.decode() {
|
||||||
|
Ok(s) => print!("{}", String::from_utf8(s).unwrap()),
|
||||||
|
Err(_) => crash!(1, "invalid input"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
src/uu/base32/src/main.rs
Normal file
1
src/uu/base32/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_base32); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "base64"
|
name = "uu_base64"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_base64"
|
|
||||||
path = "src/base64.rs"
|
path = "src/base64.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = { version = "0.0.2", features = ["encoding"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features = ["encoding"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![crate_name = "uu_base64"]
|
|
||||||
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Jordy Dickinson <jordy.dickinson@gmail.com>
|
// (c) Jordy Dickinson <jordy.dickinson@gmail.com>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE file
|
// For the full copyright and license information, please view the LICENSE file
|
||||||
// that was distributed with this source code.
|
// that was distributed with this source code.
|
||||||
//
|
|
||||||
|
|
||||||
use uucore;
|
use uucore;
|
||||||
use uucore::encoding::{wrap_print, Data, Format};
|
use uucore::encoding::{wrap_print, Data, Format};
|
||||||
|
|
1
src/uu/base64/src/main.rs
Normal file
1
src/uu/base64/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_base64); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "basename"
|
name = "uu_basename"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_basename"
|
|
||||||
path = "src/basename.rs"
|
path = "src/basename.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "basename"
|
name = "basename"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_basename"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Jimmy Lu <jimmy.lu.2011@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Jimmy Lu <jimmy.lu.2011@gmail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/basename/src/main.rs
Normal file
1
src/uu/basename/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_basename); // spell-checker:ignore procs uucore
|
|
@ -1,21 +1,20 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cat"
|
name = "uu_cat"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_cat"
|
|
||||||
path = "src/cat.rs"
|
path = "src/cat.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
quick-error = "1.2.3"
|
quick-error = "1.2.3"
|
||||||
uucore = { version = "0.0.2", features = ["fs"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
unix_socket = "0.5.0"
|
unix_socket = "0.5.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cat"
|
name = "cat"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![crate_name = "uu_cat"]
|
|
||||||
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Jordi Boggiano <j.boggiano@seld.be>
|
// (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||||
|
@ -8,7 +6,6 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate quick_error;
|
extern crate quick_error;
|
||||||
|
|
1
src/uu/cat/src/main.rs
Normal file
1
src/uu/cat/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_cat); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "chgrp"
|
name = "uu_chgrp"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_chgrp"
|
|
||||||
path = "src/chgrp.rs"
|
path = "src/chgrp.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = { version = "0.0.2", features = ["entries", "fs"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "fs"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
walkdir = "2.2.8"
|
walkdir = "2.2.8"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chgrp"
|
name = "chgrp"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
#![crate_name = "uu_chgrp"]
|
|
||||||
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/chgrp/src/main.rs
Normal file
1
src/uu/chgrp/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_chgrp); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "chmod"
|
name = "uu_chmod"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_chmod"
|
|
||||||
path = "src/chmod.rs"
|
path = "src/chmod.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
uucore = { version = "0.0.2", features = ["mode"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["mode"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
walker = "1.0.0"
|
walker = "1.0.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chmod"
|
name = "chmod"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_chmod"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Alex Lyon <arcterus@mail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Alex Lyon <arcterus@mail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
1
src/uu/chmod/src/main.rs
Normal file
1
src/uu/chmod/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_chmod); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "chown"
|
name = "uu_chown"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_chown"
|
|
||||||
path = "src/chown.rs"
|
path = "src/chown.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
glob = "0.3.0"
|
glob = "0.3.0"
|
||||||
uucore = { version = "0.0.2", features = ["entries", "fs"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "fs"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
walkdir = "2.2"
|
walkdir = "2.2"
|
||||||
|
|
||||||
[dependencies.clippy]
|
[dependencies.clippy]
|
||||||
|
@ -20,4 +19,4 @@ optional = true
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chown"
|
name = "chown"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#![crate_name = "uu_chown"]
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//
|
|
||||||
#![cfg_attr(feature = "clippy", feature(plugin))]
|
#![cfg_attr(feature = "clippy", feature(plugin))]
|
||||||
#![cfg_attr(feature = "clippy", plugin(clippy))]
|
#![cfg_attr(feature = "clippy", plugin(clippy))]
|
||||||
|
|
||||||
|
|
1
src/uu/chown/src/main.rs
Normal file
1
src/uu/chown/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_chown); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "chroot"
|
name = "uu_chroot"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_chroot"
|
|
||||||
path = "src/chroot.rs"
|
path = "src/chroot.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
getopts = "0.2.18"
|
getopts = "0.2.18"
|
||||||
uucore = { version = "0.0.2", features = ["entries"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "chroot"
|
name = "chroot"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
#![crate_name = "uu_chroot"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Vsevolod Velichko <torkvemada@sorokdva.net>
|
||||||
* This file is part of the uutils coreutils package.
|
// (c) Jian Zeng <anonymousknight96 AT gmail.com>
|
||||||
*
|
//
|
||||||
* (c) Vsevolod Velichko <torkvemada@sorokdva.net>
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Jian Zeng <anonymousknight96 AT gmail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
|
|
||||||
|
|
1
src/uu/chroot/src/main.rs
Normal file
1
src/uu/chroot/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_chroot); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cksum"
|
name = "uu_cksum"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_cksum"
|
|
||||||
path = "src/cksum.rs"
|
path = "src/cksum.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cksum"
|
name = "cksum"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -15,12 +15,7 @@ use std::path::Path;
|
||||||
|
|
||||||
const CRC_TABLE_LEN: usize = 256;
|
const CRC_TABLE_LEN: usize = 256;
|
||||||
|
|
||||||
#[path = "../../common/mkmain.rs"]
|
|
||||||
mod mkmain;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
mkmain::main();
|
|
||||||
|
|
||||||
let out_dir = env::var("OUT_DIR").unwrap();
|
let out_dir = env::var("OUT_DIR").unwrap();
|
||||||
|
|
||||||
let mut table = Vec::with_capacity(CRC_TABLE_LEN);
|
let mut table = Vec::with_capacity(CRC_TABLE_LEN);
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_cksum"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Michael Gehring <mg@ebfe.org>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Michael Gehring <mg@ebfe.org>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/cksum/src/main.rs
Normal file
1
src/uu/cksum/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_cksum); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "comm"
|
name = "uu_comm"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_comm"
|
|
||||||
path = "src/comm.rs"
|
path = "src/comm.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
getopts = "0.2.18"
|
getopts = "0.2.18"
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "comm"
|
name = "comm"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_comm"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Michael Gehring <mg@ebfe.org>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Michael Gehring <mg@ebfe.org>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
|
|
||||||
|
|
1
src/uu/comm/src/main.rs
Normal file
1
src/uu/comm/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_comm); // spell-checker:ignore procs uucore
|
|
@ -1,15 +1,13 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cp"
|
name = "uu_cp"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = [
|
authors = [
|
||||||
"Jordy Dickinson <jordy.dickinson@gmail.com>",
|
"Jordy Dickinson <jordy.dickinson@gmail.com>",
|
||||||
"Joshua S. Miller <jsmiller@uchicago.edu>",
|
"Joshua S. Miller <jsmiller@uchicago.edu>",
|
||||||
]
|
]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_cp"
|
|
||||||
path = "src/cp.rs"
|
path = "src/cp.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -17,7 +15,8 @@ clap = "2.32"
|
||||||
filetime = "0.2"
|
filetime = "0.2"
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
quick-error = "1.2.3"
|
quick-error = "1.2.3"
|
||||||
uucore = { version = "0.0.2", features = ["fs"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
walkdir = "2.2.8"
|
walkdir = "2.2.8"
|
||||||
|
|
||||||
[target.'cfg(target_os = "linux")'.dependencies]
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
|
@ -32,4 +31,4 @@ xattr="0.2.1"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cp"
|
name = "cp"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
#![crate_name = "uu_cp"]
|
|
||||||
#![allow(clippy::missing_safety_doc)]
|
#![allow(clippy::missing_safety_doc)]
|
||||||
|
|
||||||
/*
|
// This file is part of the uutils coreutils package.
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// (c) Jordy Dickinson <jordy.dickinson@gmail.com>
|
||||||
* (c) Jordy Dickinson <jordy.dickinson@gmail.com>
|
// (c) Joshua S. Miller <jsmiller@uchicago.edu>
|
||||||
* (c) Joshua S. Miller <jsmiller@uchicago.edu>
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE file
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
// that was distributed with this source code.
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
extern crate filetime;
|
extern crate filetime;
|
||||||
|
|
1
src/uu/cp/src/main.rs
Normal file
1
src/uu/cp/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_cp); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "cut"
|
name = "uu_cut"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_cut"
|
|
||||||
path = "src/cut.rs"
|
path = "src/cut.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cut"
|
name = "cut"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_cut"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Rolf Morel <rolfmorel@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Rolf Morel <rolfmorel@gmail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/cut/src/main.rs
Normal file
1
src/uu/cut/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_cut); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "date"
|
name = "uu_date"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_date"
|
|
||||||
path = "src/date.rs"
|
path = "src/date.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4.4"
|
chrono = "0.4.4"
|
||||||
clap = "2.32"
|
clap = "2.32"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "date"
|
name = "date"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
#![crate_name = "uu_date"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Anthony Deschamps <anthony.j.deschamps@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// (c) Sylvestre Ledru <sylvestre@debian.org>
|
||||||
*
|
//
|
||||||
* (c) Anthony Deschamps <anthony.j.deschamps@gmail.com>
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Sylvestre Ledru <sylvestre@debian.org>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate chrono;
|
extern crate chrono;
|
||||||
|
|
||||||
|
|
1
src/uu/date/src/main.rs
Normal file
1
src/uu/date/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_date); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "df"
|
name = "uu_df"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_df"
|
|
||||||
path = "src/df.rs"
|
path = "src/df.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.32"
|
clap = "2.32"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
number_prefix = "0.2"
|
number_prefix = "0.2"
|
||||||
uucore = "0.0.1"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
kernel32-sys = "0.2"
|
kernel32-sys = "0.2"
|
||||||
|
@ -21,4 +20,4 @@ winapi = { version = "0.3", features = ["handleapi", "winerror"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "df"
|
name = "df"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
#![crate_name = "uu_df"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Fangxu Hu <framlog@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// (c) Sylvestre Ledru <sylvestre@debian.org>
|
||||||
*
|
//
|
||||||
* (c) Fangxu Hu <framlog@gmail.com>
|
// For the full copyright and license information, please view the LICENSE file
|
||||||
* (c) Sylvestre Ledru <sylvestre@debian.org>
|
// that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
1
src/uu/df/src/main.rs
Normal file
1
src/uu/df/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_df); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dircolors"
|
name = "uu_dircolors"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_dircolors"
|
|
||||||
path = "src/dircolors.rs"
|
path = "src/dircolors.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
glob = "0.3.0"
|
glob = "0.3.0"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "dircolors"
|
name = "dircolors"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
#![crate_name = "uu_dircolors"]
|
|
||||||
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
// (c) Jian Zeng <anonymousknight96@gmail.com>
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//
|
|
||||||
|
|
||||||
extern crate glob;
|
extern crate glob;
|
||||||
|
|
||||||
|
|
1
src/uu/dircolors/src/main.rs
Normal file
1
src/uu/dircolors/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_dircolors); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dirname"
|
name = "uu_dirname"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_dirname"
|
|
||||||
path = "src/dirname.rs"
|
path = "src/dirname.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "dirname"
|
name = "dirname"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_dirname"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Derek Chiang <derekchiang93@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Derek Chiang <derekchiang93@gmail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/dirname/src/main.rs
Normal file
1
src/uu/dirname/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_dirname); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "du"
|
name = "uu_du"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_du"
|
|
||||||
path = "src/du.rs"
|
path = "src/du.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
time = "0.1.40"
|
time = "0.1.40"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "du"
|
name = "du"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_du"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Derek Chiang <derekchiang93@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
//
|
||||||
*
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Derek Chiang <derekchiang93@gmail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate time;
|
extern crate time;
|
||||||
|
|
||||||
|
|
1
src/uu/du/src/main.rs
Normal file
1
src/uu/du/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_du); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "echo"
|
name = "uu_echo"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_echo"
|
|
||||||
path = "src/echo.rs"
|
path = "src/echo.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "echo"
|
name = "echo"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
#![crate_name = "uu_echo"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Derek Chiang <derekchiang93@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// (c) Christopher Brown <ccbrown112@gmail.com>
|
||||||
*
|
//
|
||||||
* (c) Derek Chiang <derekchiang93@gmail.com>
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Christopher Brown <ccbrown112@gmail.com>
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/echo/src/main.rs
Normal file
1
src/uu/echo/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_echo); // spell-checker:ignore procs uucore
|
9
src/uu/env/Cargo.toml
vendored
9
src/uu/env/Cargo.toml
vendored
|
@ -1,22 +1,21 @@
|
||||||
[package]
|
[package]
|
||||||
name = "env"
|
name = "uu_env"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = ["uutils developers"]
|
authors = ["uutils developers"]
|
||||||
description = "Set each NAME to VALUE in the environment and run COMMAND"
|
description = "Set each NAME to VALUE in the environment and run COMMAND"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_env"
|
|
||||||
path = "src/env.rs"
|
path = "src/env.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = "2.33"
|
clap = "2.33"
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
rust-ini = "0.13.0"
|
rust-ini = "0.13.0"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "env"
|
name = "env"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
15
src/uu/env/src/env.rs
vendored
15
src/uu/env/src/env.rs
vendored
|
@ -1,12 +1,9 @@
|
||||||
#![crate_name = "uu_env"]
|
// This file is part of the uutils coreutils package.
|
||||||
/*
|
//
|
||||||
* This file is part of the uutils coreutils package.
|
// (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||||
*
|
//
|
||||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
// For the full copyright and license information, please view the LICENSE
|
||||||
*
|
// file that was distributed with this source code.
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* last synced with: env (GNU coreutils) 8.13 */
|
/* last synced with: env (GNU coreutils) 8.13 */
|
||||||
|
|
||||||
|
|
1
src/uu/env/src/main.rs
vendored
Normal file
1
src/uu/env/src/main.rs
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_env); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "expand"
|
name = "uu_expand"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_expand"
|
|
||||||
path = "src/expand.rs"
|
path = "src/expand.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
getopts = "0.2.18"
|
getopts = "0.2.18"
|
||||||
unicode-width = "0.1.5"
|
unicode-width = "0.1.5"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "expand"
|
name = "expand"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
#![crate_name = "uu_expand"]
|
// This file is part of the uutils coreutils package.
|
||||||
|
//
|
||||||
/*
|
// (c) Virgile Andreani <virgile.andreani@anbuco.fr>
|
||||||
* This file is part of the uutils coreutils package.
|
// (c) kwantam <kwantam@gmail.com>
|
||||||
*
|
// * 2015-04-28 ~ updated to work with both UTF-8 and non-UTF-8 encodings
|
||||||
* (c) Virgile Andreani <virgile.andreani@anbuco.fr>
|
//
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// For the full copyright and license information, please view the LICENSE
|
||||||
* 20150428 updated to work with both UTF-8 and non-UTF-8 encodings
|
// file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
extern crate unicode_width;
|
extern crate unicode_width;
|
||||||
|
|
1
src/uu/expand/src/main.rs
Normal file
1
src/uu/expand/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_expand); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "expr"
|
name = "uu_expr"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_expr"
|
|
||||||
path = "src/expr.rs"
|
path = "src/expr.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
onig = "~4.3.2"
|
onig = "~4.3.2"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "expr"
|
name = "expr"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_expr"]
|
//* This file is part of the uutils coreutils package.
|
||||||
|
//*
|
||||||
/*
|
//* (c) Roman Gafiyatullin <r.gafiyatullin@me.com>
|
||||||
* This file is part of the uutils coreutils package.
|
//*
|
||||||
*
|
//* For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Roman Gafiyatullin <r.gafiyatullin@me.com>
|
//* file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate onig;
|
extern crate onig;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
1
src/uu/expr/src/main.rs
Normal file
1
src/uu/expr/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_expr); // spell-checker:ignore procs uucore
|
|
@ -1,11 +1,9 @@
|
||||||
/*
|
//* This file is part of the uutils coreutils package.
|
||||||
* This file is part of the uutils coreutils package.
|
//*
|
||||||
*
|
//* (c) Roman Gafiyatullin <r.gafiyatullin@me.com>
|
||||||
* (c) Roman Gafiyatullin <r.gafiyatullin@me.com>
|
//*
|
||||||
*
|
//* For the full copyright and license information, please view the LICENSE
|
||||||
* For the full copyright and license information, please view the LICENSE
|
//* file that was distributed with this source code.
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! Here we employ shunting-yard algorithm for building AST from tokens according to operators' precedence and associativeness.
|
//! Here we employ shunting-yard algorithm for building AST from tokens according to operators' precedence and associativeness.
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/*
|
//* This file is part of the uutils coreutils package.
|
||||||
* This file is part of the uutils coreutils package.
|
//*
|
||||||
*
|
//* (c) Roman Gafiyatullin <r.gafiyatullin@me.com>
|
||||||
* (c) Roman Gafiyatullin <r.gafiyatullin@me.com>
|
//*
|
||||||
*
|
//* For the full copyright and license information, please view the LICENSE
|
||||||
* For the full copyright and license information, please view the LICENSE
|
//* file that was distributed with this source code.
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! The following tokens are present in the expr grammar:
|
//! The following tokens are present in the expr grammar:
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "factor"
|
name = "uu_factor"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_factor"
|
|
||||||
path = "src/factor.rs"
|
path = "src/factor.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rand = "0.5"
|
rand = "0.5"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "factor"
|
name = "factor"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/*
|
// * This file is part of the uutils coreutils package.
|
||||||
* This file is part of the uutils coreutils package.
|
// *
|
||||||
*
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE file
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
// * that was distributed with this source code.
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//! Generate a table of the multiplicative inverses of p_i mod 2^64
|
//! Generate a table of the multiplicative inverses of p_i mod 2^64
|
||||||
//! for the first 1027 odd primes (all 13 bit and smaller primes).
|
//! for the first 1027 odd primes (all 13 bit and smaller primes).
|
||||||
|
@ -34,9 +32,6 @@ mod numeric;
|
||||||
|
|
||||||
mod sieve;
|
mod sieve;
|
||||||
|
|
||||||
#[path = "../../common/mkmain.rs"]
|
|
||||||
mod mkmain;
|
|
||||||
|
|
||||||
// extended Euclid algorithm
|
// extended Euclid algorithm
|
||||||
// precondition: a does not divide 2^64
|
// precondition: a does not divide 2^64
|
||||||
fn inv_mod_u64(a: u64) -> Option<u64> {
|
fn inv_mod_u64(a: u64) -> Option<u64> {
|
||||||
|
@ -74,8 +69,6 @@ fn inv_mod_u64(a: u64) -> Option<u64> {
|
||||||
|
|
||||||
#[cfg_attr(test, allow(dead_code))]
|
#[cfg_attr(test, allow(dead_code))]
|
||||||
fn main() {
|
fn main() {
|
||||||
mkmain::main();
|
|
||||||
|
|
||||||
let out_dir = env::var("OUT_DIR").unwrap();
|
let out_dir = env::var("OUT_DIR").unwrap();
|
||||||
let mut file = File::create(&Path::new(&out_dir).join("prime_table.rs")).unwrap();
|
let mut file = File::create(&Path::new(&out_dir).join("prime_table.rs")).unwrap();
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/*
|
// * This file is part of the uutils coreutils package.
|
||||||
* This file is part of the uutils coreutils package.
|
// *
|
||||||
*
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE file
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
// * that was distributed with this source code.
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use std::iter::{Chain, Cycle, Map};
|
use std::iter::{Chain, Cycle, Map};
|
||||||
use std::slice::Iter;
|
use std::slice::Iter;
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
#![crate_name = "uu_factor"]
|
// * This file is part of the uutils coreutils package.
|
||||||
|
// *
|
||||||
/*
|
// * (c) T. Jameson Little <t.jameson.little@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// * (c) Wiktor Kuropatwa <wiktor.kuropatwa@gmail.com>
|
||||||
*
|
// * * 2015-02-23 ~ added Pollard rho method implementation
|
||||||
* (c) T. Jameson Little <t.jameson.little@gmail.com>
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* (c) Wiktor Kuropatwa <wiktor.kuropatwa@gmail.com>
|
// * * 2015-04-29 ~ sped up trial division by adding table of prime inverses
|
||||||
* 20150223 added Pollard rho method implementation
|
// *
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// * For the full copyright and license information, please view the LICENSE file
|
||||||
* 20150429 sped up trial division by adding table of prime inverses
|
// * that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
|
|
1
src/uu/factor/src/main.rs
Normal file
1
src/uu/factor/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_factor); // spell-checker:ignore procs uucore
|
|
@ -1,13 +1,11 @@
|
||||||
/*
|
// * This file is part of the uutils coreutils package.
|
||||||
* This file is part of the uutils coreutils package.
|
// *
|
||||||
*
|
// * (c) Wiktor Kuropatwa <wiktor.kuropatwa@gmail.com>
|
||||||
* (c) Wiktor Kuropatwa <wiktor.kuropatwa@gmail.com>
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// * * 20150507 ~ added big_ routines to prevent overflow when num > 2^63
|
||||||
* 20150507 added big_ routines to prevent overflow when num > 2^63
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE file
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
// * that was distributed with this source code.
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use std::mem::swap;
|
use std::mem::swap;
|
||||||
use std::num::Wrapping;
|
use std::num::Wrapping;
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "false"
|
name = "uu_false"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_false"
|
|
||||||
path = "src/false.rs"
|
path = "src/false.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "false"
|
name = "false"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_false"]
|
// * This file is part of the uutils coreutils package.
|
||||||
|
// *
|
||||||
/*
|
// * (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||||
* This file is part of the uutils coreutils package.
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
// * file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
pub fn uumain(_: Vec<String>) -> i32 {
|
pub fn uumain(_: Vec<String>) -> i32 {
|
||||||
1
|
1
|
||||||
|
|
1
src/uu/false/src/main.rs
Normal file
1
src/uu/false/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_false); // spell-checker:ignore procs uucore
|
|
@ -1,19 +1,18 @@
|
||||||
[package]
|
[package]
|
||||||
name = "fmt"
|
name = "uu_fmt"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_fmt"
|
|
||||||
path = "src/fmt.rs"
|
path = "src/fmt.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
unicode-width = "0.1.5"
|
unicode-width = "0.1.5"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "fmt"
|
name = "fmt"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_fmt"]
|
// * This file is part of `fmt` from the uutils coreutils package.
|
||||||
|
// *
|
||||||
/*
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* This file is part of `fmt` from the uutils coreutils package.
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// * file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate unicode_width;
|
extern crate unicode_width;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
/*
|
// * This file is part of `fmt` from the uutils coreutils package.
|
||||||
* This file is part of `fmt` from the uutils coreutils package.
|
// *
|
||||||
*
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* For the full copyright and license information, please view the LICENSE
|
// * file that was distributed with this source code.
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use parasplit::{ParaWords, Paragraph, WordInfo};
|
use parasplit::{ParaWords, Paragraph, WordInfo};
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
|
1
src/uu/fmt/src/main.rs
Normal file
1
src/uu/fmt/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_fmt); // spell-checker:ignore procs uucore
|
|
@ -1,11 +1,9 @@
|
||||||
/*
|
// * This file is part of `fmt` from the uutils coreutils package.
|
||||||
* This file is part of `fmt` from the uutils coreutils package.
|
// *
|
||||||
*
|
// * (c) kwantam <kwantam@gmail.com>
|
||||||
* (c) kwantam <kwantam@gmail.com>
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* For the full copyright and license information, please view the LICENSE
|
// * file that was distributed with this source code.
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use std::io::{BufRead, Lines};
|
use std::io::{BufRead, Lines};
|
||||||
use std::iter::Peekable;
|
use std::iter::Peekable;
|
||||||
|
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "fold"
|
name = "uu_fold"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_fold"
|
|
||||||
path = "src/fold.rs"
|
path = "src/fold.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "fold"
|
name = "fold"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
#![crate_name = "uu_fold"]
|
// * This file is part of the uutils coreutils package.
|
||||||
|
// *
|
||||||
/*
|
// * (c) Alex Lyon <arcterus@mail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Alex Lyon <arcterus@mail.com>
|
// * file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/fold/src/main.rs
Normal file
1
src/uu/fold/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_fold); // spell-checker:ignore procs uucore
|
|
@ -1,17 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "groups"
|
name = "uu_groups"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_groups"
|
|
||||||
path = "src/groups.rs"
|
path = "src/groups.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
uucore = { version = "0.0.2", features = ["entries"] }
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries"] }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "groups"
|
name = "groups"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![crate_name = "uu_groups"]
|
|
||||||
|
|
||||||
// This file is part of the uutils coreutils package.
|
// This file is part of the uutils coreutils package.
|
||||||
//
|
//
|
||||||
// (c) Alan Andrade <alan.andradec@gmail.com>
|
// (c) Alan Andrade <alan.andradec@gmail.com>
|
||||||
|
@ -7,8 +5,6 @@
|
||||||
//
|
//
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/groups/src/main.rs
Normal file
1
src/uu/groups/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_groups); // spell-checker:ignore procs uucore
|
|
@ -1,12 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "hashsum"
|
name = "uu_hashsum"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_hashsum"
|
|
||||||
path = "src/hashsum.rs"
|
path = "src/hashsum.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
@ -20,8 +18,9 @@ regex-syntax = "0.6.7"
|
||||||
sha1 = "0.6.0"
|
sha1 = "0.6.0"
|
||||||
sha2 = "0.6.0"
|
sha2 = "0.6.0"
|
||||||
sha3 = "0.6.0"
|
sha3 = "0.6.0"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "hashsum"
|
name = "hashsum"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
#![crate_name = "uu_hashsum"]
|
// * This file is part of the uutils coreutils package.
|
||||||
|
// *
|
||||||
/*
|
// * (c) Alex Lyon <arcterus@mail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// * (c) Vsevolod Velichko <torkvemada@sorokdva.net>
|
||||||
*
|
// * (c) Gil Cottle <gcottle@redtown.org>
|
||||||
* (c) Alex Lyon <arcterus@mail.com>
|
// *
|
||||||
* (c) Vsevolod Velichko <torkvemada@sorokdva.net>
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Gil Cottle <gcottle@redtown.org>
|
// * file that was distributed with this source code.
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
extern crate hex;
|
extern crate hex;
|
||||||
|
|
1
src/uu/hashsum/src/main.rs
Normal file
1
src/uu/hashsum/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_hashsum); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "head"
|
name = "uu_head"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_head"
|
|
||||||
path = "src/head.rs"
|
path = "src/head.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "head"
|
name = "head"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
#![crate_name = "uu_head"]
|
// * This file is part of the uutils coreutils package.
|
||||||
|
// *
|
||||||
/*
|
// * (c) Alan Andrade <alan.andradec@gmail.com>
|
||||||
* This file is part of the uutils coreutils package.
|
// *
|
||||||
*
|
// * For the full copyright and license information, please view the LICENSE
|
||||||
* (c) Alan Andrade <alan.andradec@gmail.com>
|
// * file that was distributed with this source code.
|
||||||
*
|
// *
|
||||||
* For the full copyright and license information, please view the LICENSE
|
// * Synced with: https://raw.github.com/avsm/src/master/usr.bin/head/head.c
|
||||||
* file that was distributed with this source code.
|
|
||||||
*
|
|
||||||
* Synced with: https://raw.github.com/avsm/src/master/usr.bin/head/head.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
1
src/uu/head/src/main.rs
Normal file
1
src/uu/head/src/main.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uucore_procs::main!(uu_head); // spell-checker:ignore procs uucore
|
|
@ -1,18 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "hostid"
|
name = "uu_hostid"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
authors = []
|
authors = []
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
build = "../../common/mkmain.rs"
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "uu_hostid"
|
|
||||||
path = "src/hostid.rs"
|
path = "src/hostid.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.42"
|
libc = "0.2.42"
|
||||||
uucore = "0.0.2"
|
uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "hostid"
|
name = "hostid"
|
||||||
path = "../../common/uumain.rs"
|
path = "src/main.rs"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue