2015-07-31 22:49:14 +00:00
|
|
|
[package]
|
|
|
|
name = "uutils"
|
2014-06-24 08:44:28 +00:00
|
|
|
version = "0.0.1"
|
|
|
|
authors = []
|
2015-07-31 22:49:14 +00:00
|
|
|
build = "build.rs"
|
2018-08-29 01:39:50 +00:00
|
|
|
autotests = false
|
2015-07-31 22:49:14 +00:00
|
|
|
|
|
|
|
[features]
|
2015-11-29 22:27:54 +00:00
|
|
|
unix = [
|
2016-08-21 09:04:02 +00:00
|
|
|
"chgrp",
|
2015-12-01 06:27:36 +00:00
|
|
|
"chmod",
|
2016-06-22 13:36:50 +00:00
|
|
|
"chown",
|
2015-11-29 22:27:54 +00:00
|
|
|
"chroot",
|
|
|
|
"du",
|
|
|
|
"groups",
|
|
|
|
"hostid",
|
|
|
|
"id",
|
2016-07-12 18:56:21 +00:00
|
|
|
"install",
|
2015-11-29 22:27:54 +00:00
|
|
|
"kill",
|
|
|
|
"logname",
|
|
|
|
"mkfifo",
|
2016-05-07 06:57:47 +00:00
|
|
|
"mknod",
|
2015-11-29 22:27:54 +00:00
|
|
|
"nice",
|
2017-10-22 07:57:49 +00:00
|
|
|
"numfmt",
|
2015-11-29 22:27:54 +00:00
|
|
|
"nohup",
|
2016-05-22 11:59:57 +00:00
|
|
|
"pathchk",
|
2016-07-12 10:40:48 +00:00
|
|
|
"pinky",
|
2016-06-01 12:20:32 +00:00
|
|
|
"stat",
|
2015-11-29 22:27:54 +00:00
|
|
|
"stdbuf",
|
|
|
|
"timeout",
|
|
|
|
"touch",
|
|
|
|
"tty",
|
|
|
|
"uname",
|
|
|
|
"unlink",
|
|
|
|
"uptime",
|
|
|
|
"users",
|
2016-08-10 16:19:26 +00:00
|
|
|
"who",
|
2019-04-28 23:56:20 +00:00
|
|
|
|
|
|
|
"generic"
|
2015-11-29 22:27:54 +00:00
|
|
|
]
|
2019-04-28 23:56:20 +00:00
|
|
|
windows = ["generic"]
|
2016-11-24 22:54:47 +00:00
|
|
|
# Feature "fuchsia" contains the exclusive list of utilities
|
|
|
|
# that can be compiled and run on Fuchsia. Should be built
|
|
|
|
# with --no-default-features when selecting this feature.
|
2016-12-14 16:37:58 +00:00
|
|
|
# TODO: merge with "unix" to avoid duplication once we support
|
|
|
|
# all utilities in that feature.
|
2016-11-24 22:54:47 +00:00
|
|
|
fuchsia = [
|
2016-12-14 16:37:58 +00:00
|
|
|
# unix utilities
|
2016-11-24 22:54:47 +00:00
|
|
|
"chgrp",
|
|
|
|
"chmod",
|
|
|
|
"chown",
|
|
|
|
"du",
|
|
|
|
"groups",
|
|
|
|
"hostid",
|
|
|
|
"install",
|
|
|
|
"logname",
|
|
|
|
"mkfifo",
|
|
|
|
"mknod",
|
|
|
|
"nice",
|
|
|
|
"pathchk",
|
|
|
|
"stdbuf",
|
|
|
|
"tty",
|
|
|
|
"uname",
|
|
|
|
"unlink",
|
|
|
|
|
2016-12-14 16:37:58 +00:00
|
|
|
# All generic utilities
|
|
|
|
"generic"
|
2016-11-24 22:54:47 +00:00
|
|
|
]
|
2015-11-29 22:27:54 +00:00
|
|
|
generic = [
|
2018-03-05 01:58:16 +00:00
|
|
|
"arch",
|
2018-03-07 00:40:08 +00:00
|
|
|
"hostname",
|
2017-01-15 12:48:33 +00:00
|
|
|
"nproc",
|
|
|
|
"sync",
|
2018-11-25 16:46:23 +00:00
|
|
|
"touch",
|
2017-01-15 12:48:33 +00:00
|
|
|
"whoami",
|
2018-03-05 10:53:08 +00:00
|
|
|
"redox_generic"
|
2017-01-15 12:48:33 +00:00
|
|
|
]
|
2018-03-05 10:53:08 +00:00
|
|
|
# Feature "redox"/"redox_generic" contains the exclusive list of utilities
|
2017-01-15 12:48:33 +00:00
|
|
|
# that can be compiled and run on redox. Should be built
|
|
|
|
# with --no-default-features when selecting this feature.
|
|
|
|
# TODO: merge with "generic" to avoid duplication once we support
|
|
|
|
# all utilities in that feature.
|
2018-03-05 10:53:08 +00:00
|
|
|
redox_generic = [
|
2017-01-15 12:48:33 +00:00
|
|
|
|
|
|
|
# And maybe all generic utilities
|
2016-08-06 03:45:03 +00:00
|
|
|
"base32",
|
2015-11-29 22:27:54 +00:00
|
|
|
"base64",
|
|
|
|
"basename",
|
2018-03-14 17:21:12 +00:00
|
|
|
"cat",
|
2015-11-29 22:27:54 +00:00
|
|
|
"cksum",
|
|
|
|
"comm",
|
|
|
|
"cp",
|
|
|
|
"cut",
|
2017-03-27 03:43:29 +00:00
|
|
|
"date",
|
2016-05-10 15:29:29 +00:00
|
|
|
"dircolors",
|
2015-11-29 22:27:54 +00:00
|
|
|
"dirname",
|
|
|
|
"echo",
|
|
|
|
"env",
|
2016-01-06 15:34:58 +00:00
|
|
|
"expand",
|
2015-11-29 22:27:54 +00:00
|
|
|
"expr",
|
|
|
|
"factor",
|
|
|
|
"false",
|
2016-03-23 12:15:36 +00:00
|
|
|
"fmt",
|
2015-11-29 22:27:54 +00:00
|
|
|
"fold",
|
2018-03-14 22:56:16 +00:00
|
|
|
"hashsum",
|
2015-11-29 22:27:54 +00:00
|
|
|
"head",
|
2018-03-14 22:56:16 +00:00
|
|
|
"join",
|
2015-11-29 22:27:54 +00:00
|
|
|
"link",
|
2018-03-14 22:56:16 +00:00
|
|
|
"ln",
|
|
|
|
"ls",
|
|
|
|
"mkdir",
|
|
|
|
"mktemp",
|
2018-03-19 01:55:42 +00:00
|
|
|
"more",
|
2016-11-18 13:53:45 +00:00
|
|
|
"mv",
|
2018-03-14 22:56:16 +00:00
|
|
|
"nl",
|
2015-11-29 22:27:54 +00:00
|
|
|
"od",
|
|
|
|
"paste",
|
|
|
|
"printenv",
|
2015-12-24 06:11:00 +00:00
|
|
|
"printf",
|
2018-03-14 22:56:16 +00:00
|
|
|
"ptx",
|
2015-11-29 22:27:54 +00:00
|
|
|
"pwd",
|
|
|
|
"readlink",
|
|
|
|
"realpath",
|
|
|
|
"relpath",
|
|
|
|
"rm",
|
|
|
|
"rmdir",
|
|
|
|
"seq",
|
2018-03-17 01:47:35 +00:00
|
|
|
"shred",
|
2015-11-29 22:27:54 +00:00
|
|
|
"shuf",
|
|
|
|
"sleep",
|
2018-03-14 22:56:16 +00:00
|
|
|
"sort",
|
2015-11-29 22:27:54 +00:00
|
|
|
"split",
|
|
|
|
"sum",
|
|
|
|
"tac",
|
2018-03-19 04:56:26 +00:00
|
|
|
"tail",
|
2015-11-29 22:27:54 +00:00
|
|
|
"tee",
|
2018-03-17 01:39:53 +00:00
|
|
|
"test",
|
2016-03-23 12:15:36 +00:00
|
|
|
"tr",
|
2015-11-29 22:27:54 +00:00
|
|
|
"true",
|
|
|
|
"truncate",
|
|
|
|
"tsort",
|
2016-01-06 15:34:58 +00:00
|
|
|
"unexpand",
|
2015-11-29 22:27:54 +00:00
|
|
|
"uniq",
|
|
|
|
"wc",
|
|
|
|
"yes",
|
2015-07-31 22:49:14 +00:00
|
|
|
]
|
2018-03-05 10:53:08 +00:00
|
|
|
redox = [
|
|
|
|
"uname",
|
2018-03-19 01:24:25 +00:00
|
|
|
"chmod",
|
|
|
|
"install",
|
2018-03-05 10:53:08 +00:00
|
|
|
"redox_generic"
|
|
|
|
]
|
2016-02-15 23:08:37 +00:00
|
|
|
test_unimplemented = []
|
2016-07-29 11:50:59 +00:00
|
|
|
nightly = []
|
2019-04-28 23:56:20 +00:00
|
|
|
default = ["unix"]
|
2015-07-31 22:49:14 +00:00
|
|
|
|
2018-03-12 08:20:58 +00:00
|
|
|
[workspace]
|
|
|
|
|
2015-07-31 22:49:14 +00:00
|
|
|
[dependencies]
|
2019-05-13 05:42:20 +00:00
|
|
|
uucore = "0.0.1"
|
2016-07-09 19:18:10 +00:00
|
|
|
arch = { optional=true, path="src/arch" }
|
2016-08-06 03:45:03 +00:00
|
|
|
base32 = { optional=true, path="src/base32" }
|
2015-07-31 22:49:14 +00:00
|
|
|
base64 = { optional=true, path="src/base64" }
|
|
|
|
basename = { optional=true, path="src/basename" }
|
|
|
|
cat = { optional=true, path="src/cat" }
|
2016-08-21 09:04:02 +00:00
|
|
|
chgrp = { optional=true, path="src/chgrp" }
|
2015-07-31 22:49:14 +00:00
|
|
|
chmod = { optional=true, path="src/chmod" }
|
2016-06-22 13:36:50 +00:00
|
|
|
chown = { optional=true, path="src/chown" }
|
2015-07-31 22:49:14 +00:00
|
|
|
chroot = { optional=true, path="src/chroot" }
|
|
|
|
cksum = { optional=true, path="src/cksum" }
|
|
|
|
comm = { optional=true, path="src/comm" }
|
|
|
|
cp = { optional=true, path="src/cp" }
|
|
|
|
cut = { optional=true, path="src/cut" }
|
2017-03-27 03:43:29 +00:00
|
|
|
date = { optional=true, path="src/date" }
|
2016-05-10 15:29:29 +00:00
|
|
|
dircolors= { optional=true, path="src/dircolors" }
|
2015-07-31 22:49:14 +00:00
|
|
|
dirname = { optional=true, path="src/dirname" }
|
|
|
|
du = { optional=true, path="src/du" }
|
|
|
|
echo = { optional=true, path="src/echo" }
|
|
|
|
env = { optional=true, path="src/env" }
|
|
|
|
expand = { optional=true, path="src/expand" }
|
Implement expr.
Implemented as follows:
Usage: expr EXPRESSION
or: expr OPTION
--help display this help and exit
--version output version information and exit
Print the value of EXPRESSION to standard output. A blank line below
separates increasing precedence groups. EXPRESSION may be:
ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2
ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0
ARG1 < ARG2 ARG1 is less than ARG2
ARG1 <= ARG2 ARG1 is less than or equal to ARG2
ARG1 = ARG2 ARG1 is equal to ARG2
ARG1 != ARG2 ARG1 is unequal to ARG2
ARG1 >= ARG2 ARG1 is greater than or equal to ARG2
ARG1 > ARG2 ARG1 is greater than ARG2
ARG1 + ARG2 arithmetic sum of ARG1 and ARG2
ARG1 - ARG2 arithmetic difference of ARG1 and ARG2
ARG1 * ARG2 arithmetic product of ARG1 and ARG2
ARG1 / ARG2 arithmetic quotient of ARG1 divided by ARG2
ARG1 % ARG2 arithmetic remainder of ARG1 divided by ARG2
STRING : REGEXP [NOT IMPLEMENTED] anchored pattern match of REGEXP in STRING
match STRING REGEXP [NOT IMPLEMENTED] same as STRING : REGEXP
substr STRING POS LENGTH [NOT IMPLEMENTED] substring of STRING, POS counted from 1
index STRING CHARS [NOT IMPLEMENTED] index in STRING where any CHARS is found, or 0
length STRING [NOT IMPLEMENTED] length of STRING
+ TOKEN interpret TOKEN as a string, even if it is a
keyword like 'match' or an operator like '/'
( EXPRESSION ) value of EXPRESSION
Beware that many operators need to be escaped or quoted for shells.
Comparisons are arithmetic if both ARGs are numbers, else lexicographical.
Pattern matches return the string matched between \( and \) or null; if
\( and \) are not used, they return the number of characters matched or 0.
Exit status is 0 if EXPRESSION is neither null nor 0, 1 if EXPRESSION is null
or 0, 2 if EXPRESSION is syntactically invalid, and 3 if an error occurred.
Environment variables:
* EXPR_DEBUG_TOKENS=1 dump expression's tokens
* EXPR_DEBUG_RPN=1 dump expression represented in reverse polish notation
* EXPR_DEBUG_SYA_STEP=1 dump each parser step
* EXPR_DEBUG_AST=1 dump expression represented abstract syntax tree
2015-10-09 09:31:25 +00:00
|
|
|
expr = { optional=true, path="src/expr" }
|
2015-07-31 22:49:14 +00:00
|
|
|
factor = { optional=true, path="src/factor" }
|
|
|
|
false = { optional=true, path="src/false" }
|
|
|
|
fmt = { optional=true, path="src/fmt" }
|
|
|
|
fold = { optional=true, path="src/fold" }
|
|
|
|
groups = { optional=true, path="src/groups" }
|
|
|
|
hashsum = { optional=true, path="src/hashsum" }
|
|
|
|
head = { optional=true, path="src/head" }
|
|
|
|
hostid = { optional=true, path="src/hostid" }
|
|
|
|
hostname = { optional=true, path="src/hostname" }
|
|
|
|
id = { optional=true, path="src/id" }
|
2016-07-12 18:56:21 +00:00
|
|
|
install = { optional=true, path="src/install" }
|
2017-12-13 21:02:42 +00:00
|
|
|
join = { optional=true, path="src/join" }
|
2015-07-31 22:49:14 +00:00
|
|
|
kill = { optional=true, path="src/kill" }
|
|
|
|
link = { optional=true, path="src/link" }
|
|
|
|
ln = { optional=true, path="src/ln" }
|
2016-03-25 21:00:27 +00:00
|
|
|
ls = { optional=true, path="src/ls" }
|
2015-07-31 22:49:14 +00:00
|
|
|
logname = { optional=true, path="src/logname" }
|
|
|
|
mkdir = { optional=true, path="src/mkdir" }
|
|
|
|
mkfifo = { optional=true, path="src/mkfifo" }
|
2016-05-07 06:57:47 +00:00
|
|
|
mknod = { optional=true, path="src/mknod" }
|
|
|
|
mktemp = { optional=true, path="src/mktemp" }
|
2016-08-17 19:41:34 +00:00
|
|
|
more = { optional=true, path="src/more" }
|
2015-07-31 22:49:14 +00:00
|
|
|
mv = { optional=true, path="src/mv" }
|
|
|
|
nice = { optional=true, path="src/nice" }
|
|
|
|
nl = { optional=true, path="src/nl" }
|
|
|
|
nohup = { optional=true, path="src/nohup" }
|
|
|
|
nproc = { optional=true, path="src/nproc" }
|
2017-10-22 07:57:49 +00:00
|
|
|
numfmt = { optional=true, path="src/numfmt" }
|
2015-07-31 22:49:14 +00:00
|
|
|
od = { optional=true, path="src/od" }
|
|
|
|
paste = { optional=true, path="src/paste" }
|
2016-05-22 11:59:57 +00:00
|
|
|
pathchk = { optional=true, path="src/pathchk" }
|
2016-07-12 10:40:48 +00:00
|
|
|
pinky = { optional=true, path="src/pinky" }
|
2015-07-31 22:49:14 +00:00
|
|
|
printenv = { optional=true, path="src/printenv" }
|
2015-12-24 06:11:00 +00:00
|
|
|
printf = { optional=true, path="src/printf" }
|
2015-07-31 22:49:14 +00:00
|
|
|
ptx = { optional=true, path="src/ptx" }
|
|
|
|
pwd = { optional=true, path="src/pwd" }
|
|
|
|
readlink = { optional=true, path="src/readlink" }
|
|
|
|
realpath = { optional=true, path="src/realpath" }
|
|
|
|
relpath = { optional=true, path="src/relpath" }
|
|
|
|
rm = { optional=true, path="src/rm" }
|
|
|
|
rmdir = { optional=true, path="src/rmdir" }
|
|
|
|
seq = { optional=true, path="src/seq" }
|
2015-12-29 07:18:19 +00:00
|
|
|
shred = { optional=true, path="src/shred" }
|
2015-07-31 22:49:14 +00:00
|
|
|
shuf = { optional=true, path="src/shuf" }
|
|
|
|
sleep = { optional=true, path="src/sleep" }
|
|
|
|
sort = { optional=true, path="src/sort" }
|
|
|
|
split = { optional=true, path="src/split" }
|
2016-06-01 12:20:32 +00:00
|
|
|
stat = { optional=true, path="src/stat" }
|
2015-11-22 20:45:04 +00:00
|
|
|
stdbuf = { optional=true, path="src/stdbuf" }
|
2015-07-31 22:49:14 +00:00
|
|
|
sum = { optional=true, path="src/sum" }
|
|
|
|
sync = { optional=true, path="src/sync" }
|
|
|
|
tac = { optional=true, path="src/tac" }
|
|
|
|
tail = { optional=true, path="src/tail" }
|
|
|
|
tee = { optional=true, path="src/tee" }
|
2015-11-27 06:54:18 +00:00
|
|
|
test = { optional=true, path="src/test" }
|
2015-07-31 22:49:14 +00:00
|
|
|
timeout = { optional=true, path="src/timeout" }
|
|
|
|
touch = { optional=true, path="src/touch" }
|
|
|
|
tr = { optional=true, path="src/tr" }
|
|
|
|
true = { optional=true, path="src/true" }
|
|
|
|
truncate = { optional=true, path="src/truncate" }
|
|
|
|
tsort = { optional=true, path="src/tsort" }
|
|
|
|
tty = { optional=true, path="src/tty" }
|
|
|
|
uname = { optional=true, path="src/uname" }
|
|
|
|
unexpand = { optional=true, path="src/unexpand" }
|
|
|
|
uniq = { optional=true, path="src/uniq" }
|
|
|
|
unlink = { optional=true, path="src/unlink" }
|
|
|
|
uptime = { optional=true, path="src/uptime" }
|
|
|
|
users = { optional=true, path="src/users" }
|
|
|
|
wc = { optional=true, path="src/wc" }
|
2016-08-10 16:19:26 +00:00
|
|
|
who = { optional=true, path="src/who" }
|
2015-07-31 22:49:14 +00:00
|
|
|
whoami = { optional=true, path="src/whoami" }
|
|
|
|
yes = { optional=true, path="src/yes" }
|
|
|
|
|
2015-11-16 05:25:01 +00:00
|
|
|
[dev-dependencies]
|
2019-02-08 08:45:35 +00:00
|
|
|
time = "0.1.42"
|
2019-04-24 07:26:10 +00:00
|
|
|
filetime = "0.2.5"
|
2019-05-31 12:31:02 +00:00
|
|
|
libc = "0.2.56"
|
2018-10-15 07:46:09 +00:00
|
|
|
regex = "1.0.3"
|
2019-04-23 17:39:22 +00:00
|
|
|
rand = "0.6.5"
|
2018-06-12 16:41:14 +00:00
|
|
|
tempdir = "0.3.7"
|
2018-06-11 07:29:30 +00:00
|
|
|
unindent = "0.1.3"
|
2019-04-06 01:59:58 +00:00
|
|
|
lazy_static = "1.3.0"
|
2015-07-31 22:49:14 +00:00
|
|
|
|
2017-01-08 05:16:32 +00:00
|
|
|
[target.'cfg(unix)'.dev-dependencies]
|
2019-05-02 04:07:13 +00:00
|
|
|
# FIXME: this should use the normal users crate, but it conflicts with the users utility
|
|
|
|
rust-users = { git = "https://github.com/uutils/rust-users" }
|
2017-07-15 19:03:43 +00:00
|
|
|
unix_socket = "0.5.0"
|
2017-01-08 05:16:32 +00:00
|
|
|
|
2015-07-31 22:49:14 +00:00
|
|
|
[[bin]]
|
2015-12-08 02:42:08 +00:00
|
|
|
name = "uutils"
|
|
|
|
path = "src/uutils/uutils.rs"
|
2016-05-22 07:46:54 +00:00
|
|
|
|
|
|
|
[[test]]
|
|
|
|
name = "tests"
|