From db2e9509185a97eec732ef0a4f38bf81dcbcde9e Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Mon, 4 May 2020 01:25:36 -0500 Subject: [PATCH] change ~ make all sub-crates independent --- Cargo.toml | 189 +++++++++++++------------ build.rs | 112 ++++++++++++--- src/uu/arch/Cargo.toml | 9 +- src/uu/arch/src/arch.rs | 3 - src/uu/arch/src/main.rs | 1 + src/uu/base32/Cargo.toml | 9 +- src/uu/base32/src/base32.rs | 4 - src/uu/base32/src/base_common.rs | 93 ++++++++++++ src/uu/base32/src/main.rs | 1 + src/uu/base64/Cargo.toml | 9 +- src/uu/base64/src/base64.rs | 2 - src/uu/base64/src/base_common.rs | 1 - src/uu/base64/src/main.rs | 1 + src/uu/basename/Cargo.toml | 9 +- src/uu/basename/src/basename.rs | 16 +-- src/uu/basename/src/main.rs | 1 + src/uu/cat/Cargo.toml | 9 +- src/uu/cat/src/cat.rs | 3 - src/uu/cat/src/main.rs | 1 + src/uu/chgrp/Cargo.toml | 9 +- src/uu/chgrp/src/chgrp.rs | 3 - src/uu/chgrp/src/main.rs | 1 + src/uu/chmod/Cargo.toml | 9 +- src/uu/chmod/src/chmod.rs | 16 +-- src/uu/chmod/src/main.rs | 1 + src/uu/chown/Cargo.toml | 9 +- src/uu/chown/src/chown.rs | 2 - src/uu/chown/src/main.rs | 1 + src/uu/chroot/Cargo.toml | 9 +- src/uu/chroot/src/chroot.rs | 18 +-- src/uu/chroot/src/main.rs | 1 + src/uu/cksum/Cargo.toml | 8 +- src/uu/cksum/build.rs | 5 - src/uu/cksum/src/cksum.rs | 16 +-- src/uu/cksum/src/main.rs | 1 + src/uu/comm/Cargo.toml | 9 +- src/uu/comm/src/comm.rs | 16 +-- src/uu/comm/src/main.rs | 1 + src/uu/cp/Cargo.toml | 13 +- src/uu/cp/src/cp.rs | 17 +-- src/uu/cp/src/main.rs | 1 + src/uu/cut/Cargo.toml | 9 +- src/uu/cut/src/cut.rs | 16 +-- src/uu/cut/src/main.rs | 1 + src/uu/date/Cargo.toml | 9 +- src/uu/date/src/date.rs | 18 +-- src/uu/date/src/main.rs | 1 + src/uu/df/Cargo.toml | 9 +- src/uu/df/src/df.rs | 18 +-- src/uu/df/src/main.rs | 1 + src/uu/dircolors/Cargo.toml | 9 +- src/uu/dircolors/src/dircolors.rs | 3 - src/uu/dircolors/src/main.rs | 1 + src/uu/dirname/Cargo.toml | 9 +- src/uu/dirname/src/dirname.rs | 16 +-- src/uu/dirname/src/main.rs | 1 + src/uu/du/Cargo.toml | 9 +- src/uu/du/src/du.rs | 16 +-- src/uu/du/src/main.rs | 1 + src/uu/echo/Cargo.toml | 9 +- src/uu/echo/src/echo.rs | 18 +-- src/uu/echo/src/main.rs | 1 + src/uu/env/Cargo.toml | 9 +- src/uu/env/src/env.rs | 15 +- src/uu/env/src/main.rs | 1 + src/uu/expand/Cargo.toml | 9 +- src/uu/expand/src/expand.rs | 20 ++- src/uu/expand/src/main.rs | 1 + src/uu/expr/Cargo.toml | 9 +- src/uu/expr/src/expr.rs | 16 +-- src/uu/expr/src/main.rs | 1 + src/uu/expr/src/syntax_tree.rs | 14 +- src/uu/expr/src/tokens.rs | 14 +- src/uu/factor/Cargo.toml | 8 +- src/uu/factor/build.rs | 19 +-- src/uu/factor/sieve.rs | 14 +- src/uu/factor/src/factor.rs | 24 ++-- src/uu/factor/src/main.rs | 1 + src/uu/factor/src/numeric.rs | 18 ++- src/uu/false/Cargo.toml | 9 +- src/uu/false/src/false.rs | 16 +-- src/uu/false/src/main.rs | 1 + src/uu/fmt/Cargo.toml | 9 +- src/uu/fmt/src/fmt.rs | 16 +-- src/uu/fmt/src/linebreak.rs | 14 +- src/uu/fmt/src/main.rs | 1 + src/uu/fmt/src/parasplit.rs | 14 +- src/uu/fold/Cargo.toml | 9 +- src/uu/fold/src/fold.rs | 16 +-- src/uu/fold/src/main.rs | 1 + src/uu/groups/Cargo.toml | 9 +- src/uu/groups/src/groups.rs | 4 - src/uu/groups/src/main.rs | 1 + src/uu/hashsum/Cargo.toml | 9 +- src/uu/hashsum/src/hashsum.rs | 20 ++- src/uu/hashsum/src/main.rs | 1 + src/uu/head/Cargo.toml | 9 +- src/uu/head/src/head.rs | 20 ++- src/uu/head/src/main.rs | 1 + src/uu/hostid/Cargo.toml | 9 +- src/uu/hostid/src/hostid.rs | 16 +-- src/uu/hostid/src/main.rs | 1 + src/uu/hostname/Cargo.toml | 13 +- src/uu/hostname/src/hostname.rs | 16 +-- src/uu/hostname/src/main.rs | 1 + src/uu/id/Cargo.toml | 9 +- src/uu/id/src/id.rs | 3 +- src/uu/id/src/main.rs | 1 + src/uu/install/Cargo.toml | 9 +- src/uu/install/src/install.rs | 16 +-- src/uu/install/src/main.rs | 1 + src/uu/join/Cargo.toml | 9 +- src/uu/join/src/join.rs | 16 +-- src/uu/join/src/main.rs | 1 + src/uu/kill/Cargo.toml | 9 +- src/uu/kill/src/kill.rs | 16 +-- src/uu/kill/src/main.rs | 1 + src/uu/link/Cargo.toml | 9 +- src/uu/link/src/link.rs | 16 +-- src/uu/link/src/main.rs | 1 + src/uu/ln/Cargo.toml | 9 +- src/uu/ln/src/ln.rs | 16 +-- src/uu/ln/src/main.rs | 1 + src/uu/logname/Cargo.toml | 9 +- src/uu/logname/src/logname.rs | 16 +-- src/uu/logname/src/main.rs | 1 + src/uu/ls/Cargo.toml | 9 +- src/uu/ls/src/ls.rs | 3 - src/uu/ls/src/main.rs | 1 + src/uu/mkdir/Cargo.toml | 9 +- src/uu/mkdir/src/main.rs | 1 + src/uu/mkdir/src/mkdir.rs | 16 +-- src/uu/mkfifo/Cargo.toml | 9 +- src/uu/mkfifo/src/main.rs | 1 + src/uu/mkfifo/src/mkfifo.rs | 16 +-- src/uu/mknod/Cargo.toml | 8 +- src/uu/mknod/src/main.rs | 1 + src/uu/mknod/src/mknod.rs | 3 - src/uu/mktemp/Cargo.toml | 9 +- src/uu/mktemp/src/main.rs | 1 + src/uu/mktemp/src/mktemp.rs | 3 - src/uu/more/Cargo.toml | 9 +- src/uu/more/src/main.rs | 1 + src/uu/more/src/more.rs | 16 +-- src/uu/mv/Cargo.toml | 9 +- src/uu/mv/src/main.rs | 1 + src/uu/mv/src/mv.rs | 3 - src/uu/nice/Cargo.toml | 9 +- src/uu/nice/src/main.rs | 1 + src/uu/nice/src/nice.rs | 16 +-- src/uu/nl/Cargo.toml | 9 +- src/uu/nl/src/main.rs | 1 + src/uu/nl/src/nl.rs | 18 +-- src/uu/nohup/Cargo.toml | 9 +- src/uu/nohup/src/main.rs | 1 + src/uu/nohup/src/nohup.rs | 16 +-- src/uu/nproc/Cargo.toml | 9 +- src/uu/nproc/src/main.rs | 1 + src/uu/nproc/src/nproc.rs | 16 +-- src/uu/numfmt/Cargo.toml | 9 +- src/uu/numfmt/src/main.rs | 1 + src/uu/numfmt/src/numfmt.rs | 16 +-- src/uu/od/Cargo.toml | 9 +- src/uu/od/src/main.rs | 1 + src/uu/od/src/od.rs | 16 +-- src/uu/paste/Cargo.toml | 9 +- src/uu/paste/src/main.rs | 1 + src/uu/paste/src/paste.rs | 16 +-- src/uu/pathchk/Cargo.toml | 9 +- src/uu/pathchk/src/main.rs | 1 + src/uu/pathchk/src/pathchk.rs | 15 +- src/uu/pinky/Cargo.toml | 9 +- src/uu/pinky/src/main.rs | 1 + src/uu/pinky/src/pinky.rs | 3 +- src/uu/printenv/Cargo.toml | 9 +- src/uu/printenv/src/main.rs | 1 + src/uu/printenv/src/printenv.rs | 16 +-- src/uu/printf/Cargo.toml | 9 +- src/uu/printf/src/main.rs | 1 + src/uu/printf/src/printf.rs | 1 - src/uu/ptx/Cargo.toml | 9 +- src/uu/ptx/src/main.rs | 1 + src/uu/ptx/src/ptx.rs | 16 +-- src/uu/pwd/Cargo.toml | 9 +- src/uu/pwd/src/main.rs | 1 + src/uu/pwd/src/pwd.rs | 16 +-- src/uu/readlink/Cargo.toml | 9 +- src/uu/readlink/src/main.rs | 1 + src/uu/readlink/src/readlink.rs | 16 +-- src/uu/realpath/Cargo.toml | 9 +- src/uu/realpath/src/main.rs | 1 + src/uu/realpath/src/realpath.rs | 16 +-- src/uu/relpath/Cargo.toml | 9 +- src/uu/relpath/src/main.rs | 1 + src/uu/relpath/src/relpath.rs | 16 +-- src/uu/rm/Cargo.toml | 9 +- src/uu/rm/src/main.rs | 1 + src/uu/rm/src/rm.rs | 16 +-- src/uu/rmdir/Cargo.toml | 9 +- src/uu/rmdir/src/main.rs | 1 + src/uu/rmdir/src/rmdir.rs | 16 +-- src/uu/seq/Cargo.toml | 9 +- src/uu/seq/src/main.rs | 1 + src/uu/seq/src/seq.rs | 2 - src/uu/shred/Cargo.toml | 9 +- src/uu/shred/src/main.rs | 1 + src/uu/shred/src/shred.rs | 18 +-- src/uu/shuf/Cargo.toml | 9 +- src/uu/shuf/src/main.rs | 1 + src/uu/shuf/src/shuf.rs | 16 +-- src/uu/sleep/Cargo.toml | 9 +- src/uu/sleep/src/main.rs | 1 + src/uu/sleep/src/sleep.rs | 16 +-- src/uu/sort/Cargo.toml | 9 +- src/uu/sort/src/main.rs | 1 + src/uu/sort/src/sort.rs | 15 +- src/uu/split/Cargo.toml | 9 +- src/uu/split/README.md | 6 +- src/uu/split/src/main.rs | 1 + src/uu/split/src/split.rs | 16 +-- src/uu/stat/Cargo.toml | 9 +- src/uu/stat/src/main.rs | 1 + src/uu/stat/src/stat.rs | 3 - src/uu/stdbuf/Cargo.toml | 11 +- src/uu/stdbuf/build.rs | 5 - src/uu/stdbuf/src/libstdbuf/Cargo.toml | 8 +- src/uu/stdbuf/src/main.rs | 1 + src/uu/stdbuf/src/stdbuf.rs | 16 +-- src/uu/sum/Cargo.toml | 9 +- src/uu/sum/src/main.rs | 1 + src/uu/sum/src/sum.rs | 16 +-- src/uu/sync/Cargo.toml | 9 +- src/uu/sync/src/main.rs | 1 + src/uu/sync/src/sync.rs | 16 +-- src/uu/tac/Cargo.toml | 9 +- src/uu/tac/src/main.rs | 1 + src/uu/tac/src/tac.rs | 16 +-- src/uu/tail/Cargo.toml | 9 +- src/uu/tail/README.md | 15 +- src/uu/tail/src/main.rs | 1 + src/uu/tail/src/tail.rs | 20 ++- src/uu/tee/Cargo.toml | 9 +- src/uu/tee/src/main.rs | 1 + src/uu/tee/src/tee.rs | 16 +-- src/uu/test/Cargo.toml | 9 +- src/uu/test/src/main.rs | 1 + src/uu/test/src/test.rs | 16 +-- src/uu/timeout/Cargo.toml | 9 +- src/uu/timeout/src/main.rs | 1 + src/uu/timeout/src/timeout.rs | 16 +-- src/uu/touch/Cargo.toml | 9 +- src/uu/touch/src/main.rs | 1 + src/uu/touch/src/touch.rs | 3 - src/uu/tr/Cargo.toml | 9 +- src/uu/tr/src/expand.rs | 18 ++- src/uu/tr/src/main.rs | 1 + src/uu/tr/src/tr.rs | 22 ++- src/uu/true/Cargo.toml | 9 +- src/uu/true/src/main.rs | 1 + src/uu/true/src/true.rs | 16 +-- src/uu/truncate/Cargo.toml | 9 +- src/uu/truncate/src/main.rs | 1 + src/uu/truncate/src/truncate.rs | 16 +-- src/uu/tsort/Cargo.toml | 9 +- src/uu/tsort/src/main.rs | 1 + src/uu/tsort/src/tsort.rs | 18 +-- src/uu/tty/Cargo.toml | 9 +- src/uu/tty/src/main.rs | 1 + src/uu/tty/src/tty.rs | 20 ++- src/uu/uname/Cargo.toml | 9 +- src/uu/uname/src/main.rs | 1 + src/uu/uname/src/uname.rs | 3 - src/uu/unexpand/Cargo.toml | 9 +- src/uu/unexpand/src/main.rs | 1 + src/uu/unexpand/src/unexpand.rs | 20 ++- src/uu/uniq/Cargo.toml | 9 +- src/uu/uniq/src/main.rs | 1 + src/uu/uniq/src/uniq.rs | 17 +-- src/uu/unlink/Cargo.toml | 9 +- src/uu/unlink/src/main.rs | 1 + src/uu/unlink/src/unlink.rs | 16 +-- src/uu/uptime/Cargo.toml | 9 +- src/uu/uptime/src/main.rs | 1 + src/uu/uptime/src/uptime.rs | 18 +-- src/uu/users/Cargo.toml | 9 +- src/uu/users/src/main.rs | 1 + src/uu/users/src/users.rs | 17 +-- src/uu/wc/Cargo.toml | 9 +- src/uu/wc/src/main.rs | 1 + src/uu/wc/src/wc.rs | 16 +-- src/uu/who/Cargo.toml | 9 +- src/uu/who/src/main.rs | 1 + src/uu/who/src/who.rs | 3 +- src/uu/whoami/Cargo.toml | 11 +- src/uu/whoami/src/main.rs | 1 + src/uu/whoami/src/whoami.rs | 16 +-- src/uu/yes/Cargo.toml | 14 +- src/uu/yes/src/main.rs | 1 + src/uu/yes/src/yes.rs | 16 +-- tests/test_chown.rs | 6 +- tests/test_dircolors.rs | 6 +- tests/test_pinky.rs | 4 +- tests/test_stat.rs | 4 +- tests/test_tail.rs | 4 +- tests/test_touch.rs | 4 +- 305 files changed, 1319 insertions(+), 1517 deletions(-) create mode 100644 src/uu/arch/src/main.rs create mode 100644 src/uu/base32/src/base_common.rs create mode 100644 src/uu/base32/src/main.rs create mode 100644 src/uu/base64/src/main.rs create mode 100644 src/uu/basename/src/main.rs create mode 100644 src/uu/cat/src/main.rs create mode 100644 src/uu/chgrp/src/main.rs create mode 100644 src/uu/chmod/src/main.rs create mode 100644 src/uu/chown/src/main.rs create mode 100644 src/uu/chroot/src/main.rs create mode 100644 src/uu/cksum/src/main.rs create mode 100644 src/uu/comm/src/main.rs create mode 100644 src/uu/cp/src/main.rs create mode 100644 src/uu/cut/src/main.rs create mode 100644 src/uu/date/src/main.rs create mode 100644 src/uu/df/src/main.rs create mode 100644 src/uu/dircolors/src/main.rs create mode 100644 src/uu/dirname/src/main.rs create mode 100644 src/uu/du/src/main.rs create mode 100644 src/uu/echo/src/main.rs create mode 100644 src/uu/env/src/main.rs create mode 100644 src/uu/expand/src/main.rs create mode 100644 src/uu/expr/src/main.rs create mode 100644 src/uu/factor/src/main.rs create mode 100644 src/uu/false/src/main.rs create mode 100644 src/uu/fmt/src/main.rs create mode 100644 src/uu/fold/src/main.rs create mode 100644 src/uu/groups/src/main.rs create mode 100644 src/uu/hashsum/src/main.rs create mode 100644 src/uu/head/src/main.rs create mode 100644 src/uu/hostid/src/main.rs create mode 100644 src/uu/hostname/src/main.rs create mode 100644 src/uu/id/src/main.rs create mode 100644 src/uu/install/src/main.rs create mode 100644 src/uu/join/src/main.rs create mode 100644 src/uu/kill/src/main.rs create mode 100644 src/uu/link/src/main.rs create mode 100644 src/uu/ln/src/main.rs create mode 100644 src/uu/logname/src/main.rs create mode 100644 src/uu/ls/src/main.rs create mode 100644 src/uu/mkdir/src/main.rs create mode 100644 src/uu/mkfifo/src/main.rs create mode 100644 src/uu/mknod/src/main.rs create mode 100644 src/uu/mktemp/src/main.rs create mode 100644 src/uu/more/src/main.rs create mode 100644 src/uu/mv/src/main.rs create mode 100644 src/uu/nice/src/main.rs create mode 100644 src/uu/nl/src/main.rs create mode 100644 src/uu/nohup/src/main.rs create mode 100644 src/uu/nproc/src/main.rs create mode 100644 src/uu/numfmt/src/main.rs create mode 100644 src/uu/od/src/main.rs create mode 100644 src/uu/paste/src/main.rs create mode 100644 src/uu/pathchk/src/main.rs create mode 100644 src/uu/pinky/src/main.rs create mode 100644 src/uu/printenv/src/main.rs create mode 100644 src/uu/printf/src/main.rs create mode 100644 src/uu/ptx/src/main.rs create mode 100644 src/uu/pwd/src/main.rs create mode 100644 src/uu/readlink/src/main.rs create mode 100644 src/uu/realpath/src/main.rs create mode 100644 src/uu/relpath/src/main.rs create mode 100644 src/uu/rm/src/main.rs create mode 100644 src/uu/rmdir/src/main.rs create mode 100644 src/uu/seq/src/main.rs create mode 100644 src/uu/shred/src/main.rs create mode 100644 src/uu/shuf/src/main.rs create mode 100644 src/uu/sleep/src/main.rs create mode 100644 src/uu/sort/src/main.rs create mode 100644 src/uu/split/src/main.rs create mode 100644 src/uu/stat/src/main.rs create mode 100644 src/uu/stdbuf/src/main.rs create mode 100644 src/uu/sum/src/main.rs create mode 100644 src/uu/sync/src/main.rs create mode 100644 src/uu/tac/src/main.rs create mode 100644 src/uu/tail/src/main.rs create mode 100644 src/uu/tee/src/main.rs create mode 100644 src/uu/test/src/main.rs create mode 100644 src/uu/timeout/src/main.rs create mode 100644 src/uu/touch/src/main.rs create mode 100644 src/uu/tr/src/main.rs create mode 100644 src/uu/true/src/main.rs create mode 100644 src/uu/truncate/src/main.rs create mode 100644 src/uu/tsort/src/main.rs create mode 100644 src/uu/tty/src/main.rs create mode 100644 src/uu/uname/src/main.rs create mode 100644 src/uu/unexpand/src/main.rs create mode 100644 src/uu/uniq/src/main.rs create mode 100644 src/uu/unlink/src/main.rs create mode 100644 src/uu/uptime/src/main.rs create mode 100644 src/uu/users/src/main.rs create mode 100644 src/uu/wc/src/main.rs create mode 100644 src/uu/who/src/main.rs create mode 100644 src/uu/whoami/src/main.rs create mode 100644 src/uu/yes/src/main.rs diff --git a/Cargo.toml b/Cargo.toml index dbcf7c42e..a4b2454d3 100644 --- a/Cargo.toml +++ b/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 uucore = { version="0.0.2", package="uucore", git="https://github.com/uutils/uucore.git", branch="master" } # * uutils -arch = { optional=true, path="src/uu/arch" } -base32 = { optional=true, path="src/uu/base32" } -base64 = { optional=true, path="src/uu/base64" } -basename = { optional=true, path="src/uu/basename" } -cat = { optional=true, path="src/uu/cat" } -chgrp = { optional=true, path="src/uu/chgrp" } -chmod = { optional=true, path="src/uu/chmod" } -chown = { optional=true, path="src/uu/chown" } -chroot = { optional=true, path="src/uu/chroot" } -cksum = { optional=true, path="src/uu/cksum" } -comm = { optional=true, path="src/uu/comm" } -cp = { optional=true, path="src/uu/cp" } -cut = { optional=true, path="src/uu/cut" } -date = { optional=true, path="src/uu/date" } -df = { optional=true, path="src/uu/df" } -dircolors= { optional=true, path="src/uu/dircolors" } -dirname = { optional=true, path="src/uu/dirname" } -du = { optional=true, path="src/uu/du" } -echo = { optional=true, path="src/uu/echo" } -env = { optional=true, path="src/uu/env" } -expand = { optional=true, path="src/uu/expand" } -expr = { optional=true, path="src/uu/expr" } -factor = { optional=true, path="src/uu/factor" } -false = { optional=true, path="src/uu/false" } -fmt = { optional=true, path="src/uu/fmt" } -fold = { optional=true, path="src/uu/fold" } -groups = { optional=true, path="src/uu/groups" } -hashsum = { optional=true, path="src/uu/hashsum" } -head = { optional=true, path="src/uu/head" } -hostid = { optional=true, path="src/uu/hostid" } -hostname = { optional=true, path="src/uu/hostname" } -id = { optional=true, path="src/uu/id" } -install = { optional=true, path="src/uu/install" } -join = { optional=true, path="src/uu/join" } -kill = { optional=true, path="src/uu/kill" } -link = { optional=true, path="src/uu/link" } -ln = { optional=true, path="src/uu/ln" } -ls = { optional=true, path="src/uu/ls" } -logname = { optional=true, path="src/uu/logname" } -mkdir = { optional=true, path="src/uu/mkdir" } -mkfifo = { optional=true, path="src/uu/mkfifo" } -mknod = { optional=true, path="src/uu/mknod" } -mktemp = { optional=true, path="src/uu/mktemp" } -more = { optional=true, path="src/uu/more" } -mv = { optional=true, path="src/uu/mv" } -nice = { optional=true, path="src/uu/nice" } -nl = { optional=true, path="src/uu/nl" } -nohup = { optional=true, path="src/uu/nohup" } -nproc = { optional=true, path="src/uu/nproc" } -numfmt = { optional=true, path="src/uu/numfmt" } -od = { optional=true, path="src/uu/od" } -paste = { optional=true, path="src/uu/paste" } -pathchk = { optional=true, path="src/uu/pathchk" } -pinky = { optional=true, path="src/uu/pinky" } -printenv = { optional=true, path="src/uu/printenv" } -printf = { optional=true, path="src/uu/printf" } -ptx = { optional=true, path="src/uu/ptx" } -pwd = { optional=true, path="src/uu/pwd" } -readlink = { optional=true, path="src/uu/readlink" } -realpath = { optional=true, path="src/uu/realpath" } -relpath = { optional=true, path="src/uu/relpath" } -rm = { optional=true, path="src/uu/rm" } -rmdir = { optional=true, path="src/uu/rmdir" } -seq = { optional=true, path="src/uu/seq" } -shred = { optional=true, path="src/uu/shred" } -shuf = { optional=true, path="src/uu/shuf" } -sleep = { optional=true, path="src/uu/sleep" } -sort = { optional=true, path="src/uu/sort" } -split = { optional=true, path="src/uu/split" } -stat = { optional=true, path="src/uu/stat" } -stdbuf = { optional=true, path="src/uu/stdbuf" } -sum = { optional=true, path="src/uu/sum" } -sync = { optional=true, path="src/uu/sync" } -tac = { optional=true, path="src/uu/tac" } -tail = { optional=true, path="src/uu/tail" } -tee = { optional=true, path="src/uu/tee" } -test = { optional=true, path="src/uu/test" } -timeout = { optional=true, path="src/uu/timeout" } -touch = { optional=true, path="src/uu/touch" } -tr = { optional=true, path="src/uu/tr" } -true = { optional=true, path="src/uu/true" } -truncate = { optional=true, path="src/uu/truncate" } -tsort = { optional=true, path="src/uu/tsort" } -tty = { optional=true, path="src/uu/tty" } -uname = { optional=true, path="src/uu/uname" } -unexpand = { optional=true, path="src/uu/unexpand" } -uniq = { optional=true, path="src/uu/uniq" } -unlink = { optional=true, path="src/uu/unlink" } -uptime = { optional=true, path="src/uu/uptime" } -users = { optional=true, path="src/uu/users" } -wc = { optional=true, path="src/uu/wc" } -who = { optional=true, path="src/uu/who" } -whoami = { optional=true, path="src/uu/whoami" } -yes = { optional=true, path="src/uu/yes" } +arch = { optional=true, version="0.0.1", package="uu_arch", path="src/uu/arch" } +base32 = { optional=true, version="0.0.1", package="uu_base32", path="src/uu/base32" } +base64 = { optional=true, version="0.0.1", package="uu_base64", path="src/uu/base64" } +basename = { optional=true, version="0.0.1", package="uu_basename", path="src/uu/basename" } +cat = { optional=true, version="0.0.1", package="uu_cat", path="src/uu/cat" } +chgrp = { optional=true, version="0.0.1", package="uu_chgrp", path="src/uu/chgrp" } +chmod = { optional=true, version="0.0.1", package="uu_chmod", path="src/uu/chmod" } +chown = { optional=true, version="0.0.1", package="uu_chown", path="src/uu/chown" } +chroot = { optional=true, version="0.0.1", package="uu_chroot", path="src/uu/chroot" } +cksum = { optional=true, version="0.0.1", package="uu_cksum", path="src/uu/cksum" } +comm = { optional=true, version="0.0.1", package="uu_comm", path="src/uu/comm" } +cp = { optional=true, version="0.0.1", package="uu_cp", path="src/uu/cp" } +cut = { optional=true, version="0.0.1", package="uu_cut", path="src/uu/cut" } +date = { optional=true, version="0.0.1", package="uu_date", path="src/uu/date" } +df = { optional=true, version="0.0.1", package="uu_df", path="src/uu/df" } +dircolors= { optional=true, version="0.0.1", package="uu_dircolors", path="src/uu/dircolors" } +dirname = { optional=true, version="0.0.1", package="uu_dirname", path="src/uu/dirname" } +du = { optional=true, version="0.0.1", package="uu_du", path="src/uu/du" } +echo = { optional=true, version="0.0.1", package="uu_echo", path="src/uu/echo" } +env = { optional=true, version="0.0.1", package="uu_env", path="src/uu/env" } +expand = { optional=true, version="0.0.1", package="uu_expand", path="src/uu/expand" } +expr = { optional=true, version="0.0.1", package="uu_expr", path="src/uu/expr" } +factor = { optional=true, version="0.0.1", package="uu_factor", path="src/uu/factor" } +false = { optional=true, version="0.0.1", package="uu_false", path="src/uu/false" } +fmt = { optional=true, version="0.0.1", package="uu_fmt", path="src/uu/fmt" } +fold = { optional=true, version="0.0.1", package="uu_fold", path="src/uu/fold" } +groups = { optional=true, version="0.0.1", package="uu_groups", path="src/uu/groups" } +hashsum = { optional=true, version="0.0.1", package="uu_hashsum", path="src/uu/hashsum" } +head = { optional=true, version="0.0.1", package="uu_head", path="src/uu/head" } +hostid = { optional=true, version="0.0.1", package="uu_hostid", path="src/uu/hostid" } +hostname = { optional=true, version="0.0.1", package="uu_hostname", path="src/uu/hostname" } +id = { optional=true, version="0.0.1", package="uu_id", path="src/uu/id" } +install = { optional=true, version="0.0.1", package="uu_install", path="src/uu/install" } +join = { optional=true, version="0.0.1", package="uu_join", path="src/uu/join" } +kill = { optional=true, version="0.0.1", package="uu_kill", path="src/uu/kill" } +link = { optional=true, version="0.0.1", package="uu_link", path="src/uu/link" } +ln = { optional=true, version="0.0.1", package="uu_ln", path="src/uu/ln" } +ls = { optional=true, version="0.0.1", package="uu_ls", path="src/uu/ls" } +logname = { optional=true, version="0.0.1", package="uu_logname", path="src/uu/logname" } +mkdir = { optional=true, version="0.0.1", package="uu_mkdir", path="src/uu/mkdir" } +mkfifo = { optional=true, version="0.0.1", package="uu_mkfifo", path="src/uu/mkfifo" } +mknod = { optional=true, version="0.0.1", package="uu_mknod", path="src/uu/mknod" } +mktemp = { optional=true, version="0.0.1", package="uu_mktemp", path="src/uu/mktemp" } +more = { optional=true, version="0.0.1", package="uu_more", path="src/uu/more" } +mv = { optional=true, version="0.0.1", package="uu_mv", path="src/uu/mv" } +nice = { optional=true, version="0.0.1", package="uu_nice", path="src/uu/nice" } +nl = { optional=true, version="0.0.1", package="uu_nl", path="src/uu/nl" } +nohup = { optional=true, version="0.0.1", package="uu_nohup", path="src/uu/nohup" } +nproc = { optional=true, version="0.0.1", package="uu_nproc", path="src/uu/nproc" } +numfmt = { optional=true, version="0.0.1", package="uu_numfmt", path="src/uu/numfmt" } +od = { optional=true, version="0.0.1", package="uu_od", path="src/uu/od" } +paste = { optional=true, version="0.0.1", package="uu_paste", path="src/uu/paste" } +pathchk = { optional=true, version="0.0.1", package="uu_pathchk", path="src/uu/pathchk" } +pinky = { optional=true, version="0.0.1", package="uu_pinky", path="src/uu/pinky" } +printenv = { optional=true, version="0.0.1", package="uu_printenv", path="src/uu/printenv" } +printf = { optional=true, version="0.0.1", package="uu_printf", path="src/uu/printf" } +ptx = { optional=true, version="0.0.1", package="uu_ptx", path="src/uu/ptx" } +pwd = { optional=true, version="0.0.1", package="uu_pwd", path="src/uu/pwd" } +readlink = { optional=true, version="0.0.1", package="uu_readlink", path="src/uu/readlink" } +realpath = { optional=true, version="0.0.1", package="uu_realpath", path="src/uu/realpath" } +relpath = { optional=true, version="0.0.1", package="uu_relpath", path="src/uu/relpath" } +rm = { optional=true, version="0.0.1", package="uu_rm", path="src/uu/rm" } +rmdir = { optional=true, version="0.0.1", package="uu_rmdir", path="src/uu/rmdir" } +seq = { optional=true, version="0.0.1", package="uu_seq", path="src/uu/seq" } +shred = { optional=true, version="0.0.1", package="uu_shred", path="src/uu/shred" } +shuf = { optional=true, version="0.0.1", package="uu_shuf", path="src/uu/shuf" } +sleep = { optional=true, version="0.0.1", package="uu_sleep", path="src/uu/sleep" } +sort = { optional=true, version="0.0.1", package="uu_sort", path="src/uu/sort" } +split = { optional=true, version="0.0.1", package="uu_split", path="src/uu/split" } +stat = { optional=true, version="0.0.1", package="uu_stat", path="src/uu/stat" } +stdbuf = { optional=true, version="0.0.1", package="uu_stdbuf", path="src/uu/stdbuf" } +sum = { optional=true, version="0.0.1", package="uu_sum", path="src/uu/sum" } +sync = { optional=true, version="0.0.1", package="uu_sync", path="src/uu/sync" } +tac = { optional=true, version="0.0.1", package="uu_tac", path="src/uu/tac" } +tail = { optional=true, version="0.0.1", package="uu_tail", path="src/uu/tail" } +tee = { optional=true, version="0.0.1", package="uu_tee", path="src/uu/tee" } +test = { optional=true, version="0.0.1", package="uu_test", path="src/uu/test" } +timeout = { optional=true, version="0.0.1", package="uu_timeout", path="src/uu/timeout" } +touch = { optional=true, version="0.0.1", package="uu_touch", path="src/uu/touch" } +tr = { optional=true, version="0.0.1", package="uu_tr", path="src/uu/tr" } +true = { optional=true, version="0.0.1", package="uu_true", path="src/uu/true" } +truncate = { optional=true, version="0.0.1", package="uu_truncate", path="src/uu/truncate" } +tsort = { optional=true, version="0.0.1", package="uu_tsort", path="src/uu/tsort" } +tty = { optional=true, version="0.0.1", package="uu_tty", path="src/uu/tty" } +uname = { optional=true, version="0.0.1", package="uu_uname", path="src/uu/uname" } +unexpand = { optional=true, version="0.0.1", package="uu_unexpand", path="src/uu/unexpand" } +uniq = { optional=true, version="0.0.1", package="uu_uniq", path="src/uu/uniq" } +unlink = { optional=true, version="0.0.1", package="uu_unlink", path="src/uu/unlink" } +uptime = { optional=true, version="0.0.1", package="uu_uptime", path="src/uu/uptime" } +users = { optional=true, version="0.0.1", package="uu_users", path="src/uu/users" } +wc = { optional=true, version="0.0.1", package="uu_wc", path="src/uu/wc" } +who = { optional=true, version="0.0.1", package="uu_who", path="src/uu/who" } +whoami = { optional=true, version="0.0.1", package="uu_whoami", path="src/uu/whoami" } +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 _backtrace = { version=">= 0.3.3, <= 0.3.30", package="backtrace" } @@ -324,6 +324,7 @@ regex = "1.0" tempdir = "0.3" time = "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] rust-users = { version="0.10", package="users" } diff --git a/build.rs b/build.rs index 833c91112..c51ce1481 100644 --- a/build.rs +++ b/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::fs::File; use std::io::Write; @@ -40,30 +43,99 @@ pub fn main() { .unwrap(); for krate in crates { - cf.write_all(format!("extern crate uu_{krate};\n", krate = krate).as_bytes()) - .unwrap(); + match krate.as_ref() { + "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() { - "hashsum" => { - mf.write_all( - "map.insert(\"hashsum\", uu_hashsum::uumain); - map.insert(\"md5sum\", uu_hashsum::uumain); - map.insert(\"sha1sum\", uu_hashsum::uumain); - map.insert(\"sha224sum\", uu_hashsum::uumain); - map.insert(\"sha256sum\", uu_hashsum::uumain); - map.insert(\"sha384sum\", uu_hashsum::uumain); - map.insert(\"sha512sum\", uu_hashsum::uumain); - map.insert(\"sha3sum\", uu_hashsum::uumain); - map.insert(\"sha3-224sum\", uu_hashsum::uumain); - map.insert(\"sha3-256sum\", uu_hashsum::uumain); - map.insert(\"sha3-384sum\", uu_hashsum::uumain); - map.insert(\"sha3-512sum\", uu_hashsum::uumain); - map.insert(\"shake128sum\", uu_hashsum::uumain); - map.insert(\"shake256sum\", uu_hashsum::uumain);\n" + "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" + => mf + .write_all( + format!("map.insert(\"{krate}\", {krate}::uumain);\n", krate = krate) .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 .write_all( format!( diff --git a/src/uu/arch/Cargo.toml b/src/uu/arch/Cargo.toml index 7fc71e1b4..f546917f7 100644 --- a/src/uu/arch/Cargo.toml +++ b/src/uu/arch/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "arch" +name = "uu_arch" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_arch" path = "src/arch.rs" [dependencies] 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]] name = "arch" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/arch/src/arch.rs b/src/uu/arch/src/arch.rs index ced3d6e97..a92ea6226 100644 --- a/src/uu/arch/src/arch.rs +++ b/src/uu/arch/src/arch.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_arch"] - // This file is part of the uutils coreutils package. // // (c) Smigle00 @@ -7,7 +5,6 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// extern crate platform_info; #[macro_use] diff --git a/src/uu/arch/src/main.rs b/src/uu/arch/src/main.rs new file mode 100644 index 000000000..43e0af5bf --- /dev/null +++ b/src/uu/arch/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_arch); // spell-checker:ignore procs uucore diff --git a/src/uu/base32/Cargo.toml b/src/uu/base32/Cargo.toml index 63f5c6ebf..83cf8e1d7 100644 --- a/src/uu/base32/Cargo.toml +++ b/src/uu/base32/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "base32" +name = "uu_base32" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_base32" path = "src/base32.rs" [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 clippy = { version = "0.0.212", optional = true } [[bin]] name = "base32" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/base32/src/base32.rs b/src/uu/base32/src/base32.rs index 83d2b7e46..f98a7814f 100644 --- a/src/uu/base32/src/base32.rs +++ b/src/uu/base32/src/base32.rs @@ -4,15 +4,11 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// - -#![crate_name = "uu_base32"] #[macro_use] extern crate uucore; use uucore::encoding::Format; -#[path = "../../base64/src/base_common.rs"] mod base_common; static SYNTAX: &str = "[OPTION]... [FILE]"; diff --git a/src/uu/base32/src/base_common.rs b/src/uu/base32/src/base_common.rs new file mode 100644 index 000000000..0d24a0108 --- /dev/null +++ b/src/uu/base32/src/base_common.rs @@ -0,0 +1,93 @@ +// This file is part of the uutils coreutils package. +// +// (c) Jordy Dickinson +// (c) Jian Zeng +// (c) Alex Lyon +// +// 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, + 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( + input: &mut R, + format: Format, + line_wrap: Option, + 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"), + } + } +} diff --git a/src/uu/base32/src/main.rs b/src/uu/base32/src/main.rs new file mode 100644 index 000000000..b59cb89f0 --- /dev/null +++ b/src/uu/base32/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_base32); // spell-checker:ignore procs uucore diff --git a/src/uu/base64/Cargo.toml b/src/uu/base64/Cargo.toml index 300c616c2..4db021c6d 100644 --- a/src/uu/base64/Cargo.toml +++ b/src/uu/base64/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "base64" +name = "uu_base64" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_base64" path = "src/base64.rs" [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]] name = "base64" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/base64/src/base64.rs b/src/uu/base64/src/base64.rs index effd4598b..cfd31bf3d 100644 --- a/src/uu/base64/src/base64.rs +++ b/src/uu/base64/src/base64.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_base64"] - // This file is part of the uutils coreutils package. // // (c) Jordy Dickinson diff --git a/src/uu/base64/src/base_common.rs b/src/uu/base64/src/base_common.rs index 1bb09ace1..0d24a0108 100644 --- a/src/uu/base64/src/base_common.rs +++ b/src/uu/base64/src/base_common.rs @@ -6,7 +6,6 @@ // // 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}; diff --git a/src/uu/base64/src/main.rs b/src/uu/base64/src/main.rs new file mode 100644 index 000000000..07ed34256 --- /dev/null +++ b/src/uu/base64/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_base64); // spell-checker:ignore procs uucore diff --git a/src/uu/basename/Cargo.toml b/src/uu/basename/Cargo.toml index d1cebb4c3..c9b2b4a46 100644 --- a/src/uu/basename/Cargo.toml +++ b/src/uu/basename/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "basename" +name = "uu_basename" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_basename" path = "src/basename.rs" [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]] name = "basename" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/basename/src/basename.rs b/src/uu/basename/src/basename.rs index 9711efea3..d8f492f55 100644 --- a/src/uu/basename/src/basename.rs +++ b/src/uu/basename/src/basename.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_basename"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jimmy Lu - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Jimmy Lu +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/basename/src/main.rs b/src/uu/basename/src/main.rs new file mode 100644 index 000000000..d1aa19f2b --- /dev/null +++ b/src/uu/basename/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_basename); // spell-checker:ignore procs uucore diff --git a/src/uu/cat/Cargo.toml b/src/uu/cat/Cargo.toml index c64fcb52e..41e116f10 100644 --- a/src/uu/cat/Cargo.toml +++ b/src/uu/cat/Cargo.toml @@ -1,21 +1,20 @@ [package] -name = "cat" +name = "uu_cat" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_cat" path = "src/cat.rs" [dependencies] 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] unix_socket = "0.5.0" [[bin]] name = "cat" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/cat/src/cat.rs b/src/uu/cat/src/cat.rs index 35be33030..b0f0b1171 100644 --- a/src/uu/cat/src/cat.rs +++ b/src/uu/cat/src/cat.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_cat"] - // This file is part of the uutils coreutils package. // // (c) Jordi Boggiano @@ -8,7 +6,6 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// #[macro_use] extern crate quick_error; diff --git a/src/uu/cat/src/main.rs b/src/uu/cat/src/main.rs new file mode 100644 index 000000000..2b7969473 --- /dev/null +++ b/src/uu/cat/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_cat); // spell-checker:ignore procs uucore diff --git a/src/uu/chgrp/Cargo.toml b/src/uu/chgrp/Cargo.toml index 37f490cbf..1a2664248 100644 --- a/src/uu/chgrp/Cargo.toml +++ b/src/uu/chgrp/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "chgrp" +name = "uu_chgrp" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_chgrp" path = "src/chgrp.rs" [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" [[bin]] name = "chgrp" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/chgrp/src/chgrp.rs b/src/uu/chgrp/src/chgrp.rs index fac36f672..3435e66bf 100644 --- a/src/uu/chgrp/src/chgrp.rs +++ b/src/uu/chgrp/src/chgrp.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_chgrp"] - // This file is part of the uutils coreutils package. // // (c) Jian Zeng // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// #[macro_use] extern crate uucore; diff --git a/src/uu/chgrp/src/main.rs b/src/uu/chgrp/src/main.rs new file mode 100644 index 000000000..2faba7ba4 --- /dev/null +++ b/src/uu/chgrp/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_chgrp); // spell-checker:ignore procs uucore diff --git a/src/uu/chmod/Cargo.toml b/src/uu/chmod/Cargo.toml index 8b3d5c43e..1527bdb15 100644 --- a/src/uu/chmod/Cargo.toml +++ b/src/uu/chmod/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "chmod" +name = "uu_chmod" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_chmod" path = "src/chmod.rs" [dependencies] 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" [[bin]] name = "chmod" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/chmod/src/chmod.rs b/src/uu/chmod/src/chmod.rs index 5819f118a..5f1ab050a 100644 --- a/src/uu/chmod/src/chmod.rs +++ b/src/uu/chmod/src/chmod.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_chmod"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Alex Lyon +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. #[cfg(unix)] extern crate libc; diff --git a/src/uu/chmod/src/main.rs b/src/uu/chmod/src/main.rs new file mode 100644 index 000000000..604bd9a7d --- /dev/null +++ b/src/uu/chmod/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_chmod); // spell-checker:ignore procs uucore diff --git a/src/uu/chown/Cargo.toml b/src/uu/chown/Cargo.toml index 98be41b04..bc8cc5b99 100644 --- a/src/uu/chown/Cargo.toml +++ b/src/uu/chown/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "chown" +name = "uu_chown" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_chown" path = "src/chown.rs" [dependencies] 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" [dependencies.clippy] @@ -20,4 +19,4 @@ optional = true [[bin]] name = "chown" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/chown/src/chown.rs b/src/uu/chown/src/chown.rs index 7b7378492..920adaeb6 100644 --- a/src/uu/chown/src/chown.rs +++ b/src/uu/chown/src/chown.rs @@ -1,11 +1,9 @@ -#![crate_name = "uu_chown"] // This file is part of the uutils coreutils package. // // (c) Jian Zeng // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// #![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] diff --git a/src/uu/chown/src/main.rs b/src/uu/chown/src/main.rs new file mode 100644 index 000000000..ee5aeeba0 --- /dev/null +++ b/src/uu/chown/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_chown); // spell-checker:ignore procs uucore diff --git a/src/uu/chroot/Cargo.toml b/src/uu/chroot/Cargo.toml index 2c17faf92..5953b4046 100644 --- a/src/uu/chroot/Cargo.toml +++ b/src/uu/chroot/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "chroot" +name = "uu_chroot" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_chroot" path = "src/chroot.rs" [dependencies] 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]] name = "chroot" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/chroot/src/chroot.rs b/src/uu/chroot/src/chroot.rs index 140d2f18b..eaa718298 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_chroot"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Vsevolod Velichko - * (c) Jian Zeng - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Vsevolod Velichko +// (c) Jian Zeng +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/chroot/src/main.rs b/src/uu/chroot/src/main.rs new file mode 100644 index 000000000..a177c9301 --- /dev/null +++ b/src/uu/chroot/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_chroot); // spell-checker:ignore procs uucore diff --git a/src/uu/cksum/Cargo.toml b/src/uu/cksum/Cargo.toml index 403e0e8e1..d3004690e 100644 --- a/src/uu/cksum/Cargo.toml +++ b/src/uu/cksum/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "cksum" +name = "uu_cksum" version = "0.0.1" authors = [] license = "MIT" [lib] -name = "uu_cksum" path = "src/cksum.rs" [dependencies] 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]] name = "cksum" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/cksum/build.rs b/src/uu/cksum/build.rs index df4e02c28..4d4a639c6 100644 --- a/src/uu/cksum/build.rs +++ b/src/uu/cksum/build.rs @@ -15,12 +15,7 @@ use std::path::Path; const CRC_TABLE_LEN: usize = 256; -#[path = "../../common/mkmain.rs"] -mod mkmain; - fn main() { - mkmain::main(); - let out_dir = env::var("OUT_DIR").unwrap(); let mut table = Vec::with_capacity(CRC_TABLE_LEN); diff --git a/src/uu/cksum/src/cksum.rs b/src/uu/cksum/src/cksum.rs index 22ebabf2e..330fac646 100644 --- a/src/uu/cksum/src/cksum.rs +++ b/src/uu/cksum/src/cksum.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_cksum"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Michael Gehring +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/cksum/src/main.rs b/src/uu/cksum/src/main.rs new file mode 100644 index 000000000..50f424f41 --- /dev/null +++ b/src/uu/cksum/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_cksum); // spell-checker:ignore procs uucore diff --git a/src/uu/comm/Cargo.toml b/src/uu/comm/Cargo.toml index 017de5209..b10d6fc97 100644 --- a/src/uu/comm/Cargo.toml +++ b/src/uu/comm/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "comm" +name = "uu_comm" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_comm" path = "src/comm.rs" [dependencies] getopts = "0.2.18" 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]] name = "comm" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/comm/src/comm.rs b/src/uu/comm/src/comm.rs index 1997c27e6..c98420004 100644 --- a/src/uu/comm/src/comm.rs +++ b/src/uu/comm/src/comm.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_comm"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Michael Gehring +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/comm/src/main.rs b/src/uu/comm/src/main.rs new file mode 100644 index 000000000..149098c3c --- /dev/null +++ b/src/uu/comm/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_comm); // spell-checker:ignore procs uucore diff --git a/src/uu/cp/Cargo.toml b/src/uu/cp/Cargo.toml index 27d090e48..b73fb4caf 100644 --- a/src/uu/cp/Cargo.toml +++ b/src/uu/cp/Cargo.toml @@ -1,15 +1,13 @@ [package] -name = "cp" +name = "uu_cp" version = "0.0.1" authors = [ - "Jordy Dickinson ", - "Joshua S. Miller ", + "Jordy Dickinson ", + "Joshua S. Miller ", ] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_cp" path = "src/cp.rs" [dependencies] @@ -17,7 +15,8 @@ clap = "2.32" filetime = "0.2" libc = "0.2.42" 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" [target.'cfg(target_os = "linux")'.dependencies] @@ -32,4 +31,4 @@ xattr="0.2.1" [[bin]] name = "cp" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 74e12c487..4be8d49bc 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1,15 +1,12 @@ -#![crate_name = "uu_cp"] #![allow(clippy::missing_safety_doc)] -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordy Dickinson - * (c) Joshua S. Miller - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Jordy Dickinson +// (c) Joshua S. Miller +// +// For the full copyright and license information, please view the LICENSE file +// that was distributed with this source code. extern crate clap; extern crate filetime; diff --git a/src/uu/cp/src/main.rs b/src/uu/cp/src/main.rs new file mode 100644 index 000000000..425d490e7 --- /dev/null +++ b/src/uu/cp/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_cp); // spell-checker:ignore procs uucore diff --git a/src/uu/cut/Cargo.toml b/src/uu/cut/Cargo.toml index 59bb0f56d..17d921bb7 100644 --- a/src/uu/cut/Cargo.toml +++ b/src/uu/cut/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "cut" +name = "uu_cut" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_cut" path = "src/cut.rs" [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]] name = "cut" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/cut/src/cut.rs b/src/uu/cut/src/cut.rs index 81712ad43..16f0fbd64 100644 --- a/src/uu/cut/src/cut.rs +++ b/src/uu/cut/src/cut.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_cut"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Rolf Morel - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Rolf Morel +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/cut/src/main.rs b/src/uu/cut/src/main.rs new file mode 100644 index 000000000..065a01f40 --- /dev/null +++ b/src/uu/cut/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_cut); // spell-checker:ignore procs uucore diff --git a/src/uu/date/Cargo.toml b/src/uu/date/Cargo.toml index ccf808c3a..141ba9b88 100644 --- a/src/uu/date/Cargo.toml +++ b/src/uu/date/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "date" +name = "uu_date" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_date" path = "src/date.rs" [dependencies] chrono = "0.4.4" 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]] name = "date" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/date/src/date.rs b/src/uu/date/src/date.rs index afa4e3187..62546f8be 100644 --- a/src/uu/date/src/date.rs +++ b/src/uu/date/src/date.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_date"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Anthony Deschamps - * (c) Sylvestre Ledru - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Anthony Deschamps +// (c) Sylvestre Ledru +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. extern crate chrono; diff --git a/src/uu/date/src/main.rs b/src/uu/date/src/main.rs new file mode 100644 index 000000000..13edc0fba --- /dev/null +++ b/src/uu/date/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_date); // spell-checker:ignore procs uucore diff --git a/src/uu/df/Cargo.toml b/src/uu/df/Cargo.toml index e77cb2650..de8f15d0c 100644 --- a/src/uu/df/Cargo.toml +++ b/src/uu/df/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "df" +name = "uu_df" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_df" path = "src/df.rs" [dependencies] clap = "2.32" libc = "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] kernel32-sys = "0.2" @@ -21,4 +20,4 @@ winapi = { version = "0.3", features = ["handleapi", "winerror"] } [[bin]] name = "df" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index 8ad08dc03..37475a3e5 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_df"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Fangxu Hu - * (c) Sylvestre Ledru - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Fangxu Hu +// (c) Sylvestre Ledru +// +// For the full copyright and license information, please view the LICENSE file +// that was distributed with this source code. extern crate clap; extern crate libc; diff --git a/src/uu/df/src/main.rs b/src/uu/df/src/main.rs new file mode 100644 index 000000000..6062603db --- /dev/null +++ b/src/uu/df/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_df); // spell-checker:ignore procs uucore diff --git a/src/uu/dircolors/Cargo.toml b/src/uu/dircolors/Cargo.toml index 5af6334fc..f246f3cd5 100644 --- a/src/uu/dircolors/Cargo.toml +++ b/src/uu/dircolors/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "dircolors" +name = "uu_dircolors" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_dircolors" path = "src/dircolors.rs" [dependencies] 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]] name = "dircolors" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/dircolors/src/dircolors.rs b/src/uu/dircolors/src/dircolors.rs index 2a485e1da..1f123dc80 100644 --- a/src/uu/dircolors/src/dircolors.rs +++ b/src/uu/dircolors/src/dircolors.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_dircolors"] - // This file is part of the uutils coreutils package. // // (c) Jian Zeng // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// extern crate glob; diff --git a/src/uu/dircolors/src/main.rs b/src/uu/dircolors/src/main.rs new file mode 100644 index 000000000..10c96ecd9 --- /dev/null +++ b/src/uu/dircolors/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_dircolors); // spell-checker:ignore procs uucore diff --git a/src/uu/dirname/Cargo.toml b/src/uu/dirname/Cargo.toml index 7eff0730e..b7ec7c075 100644 --- a/src/uu/dirname/Cargo.toml +++ b/src/uu/dirname/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "dirname" +name = "uu_dirname" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_dirname" path = "src/dirname.rs" [dependencies] 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]] name = "dirname" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/dirname/src/dirname.rs b/src/uu/dirname/src/dirname.rs index d56c9e464..7ec5df8cc 100644 --- a/src/uu/dirname/src/dirname.rs +++ b/src/uu/dirname/src/dirname.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_dirname"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Derek Chiang - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Derek Chiang +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/dirname/src/main.rs b/src/uu/dirname/src/main.rs new file mode 100644 index 000000000..e4be3372a --- /dev/null +++ b/src/uu/dirname/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_dirname); // spell-checker:ignore procs uucore diff --git a/src/uu/du/Cargo.toml b/src/uu/du/Cargo.toml index df0faf9bc..57160af8b 100644 --- a/src/uu/du/Cargo.toml +++ b/src/uu/du/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "du" +name = "uu_du" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_du" path = "src/du.rs" [dependencies] 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]] name = "du" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index bb93d8989..76fddba4a 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_du"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Derek Chiang - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Derek Chiang +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. extern crate time; diff --git a/src/uu/du/src/main.rs b/src/uu/du/src/main.rs new file mode 100644 index 000000000..de1967bc8 --- /dev/null +++ b/src/uu/du/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_du); // spell-checker:ignore procs uucore diff --git a/src/uu/echo/Cargo.toml b/src/uu/echo/Cargo.toml index 88dce77f7..3adc52366 100644 --- a/src/uu/echo/Cargo.toml +++ b/src/uu/echo/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "echo" +name = "uu_echo" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_echo" path = "src/echo.rs" [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]] name = "echo" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/echo/src/echo.rs b/src/uu/echo/src/echo.rs index 28b5a91f9..acb33ad5f 100644 --- a/src/uu/echo/src/echo.rs +++ b/src/uu/echo/src/echo.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_echo"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Derek Chiang - * (c) Christopher Brown - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Derek Chiang +// (c) Christopher Brown +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/echo/src/main.rs b/src/uu/echo/src/main.rs new file mode 100644 index 000000000..00b84e983 --- /dev/null +++ b/src/uu/echo/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_echo); // spell-checker:ignore procs uucore diff --git a/src/uu/env/Cargo.toml b/src/uu/env/Cargo.toml index 72509ef04..2884b623d 100644 --- a/src/uu/env/Cargo.toml +++ b/src/uu/env/Cargo.toml @@ -1,22 +1,21 @@ [package] -name = "env" +name = "uu_env" version = "0.0.1" authors = ["uutils developers"] description = "Set each NAME to VALUE in the environment and run COMMAND" license = "MIT" -build = "../../common/mkmain.rs" edition = "2018" [lib] -name = "uu_env" path = "src/env.rs" [dependencies] clap = "2.33" libc = "0.2.42" 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]] name = "env" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/env/src/env.rs b/src/uu/env/src/env.rs index 9b552165f..e1153d596 100644 --- a/src/uu/env/src/env.rs +++ b/src/uu/env/src/env.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_env"] -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Jordi Boggiano +// +// 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 */ diff --git a/src/uu/env/src/main.rs b/src/uu/env/src/main.rs new file mode 100644 index 000000000..8b654eb00 --- /dev/null +++ b/src/uu/env/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_env); // spell-checker:ignore procs uucore diff --git a/src/uu/expand/Cargo.toml b/src/uu/expand/Cargo.toml index fb92d5bd6..ad9422617 100644 --- a/src/uu/expand/Cargo.toml +++ b/src/uu/expand/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "expand" +name = "uu_expand" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_expand" path = "src/expand.rs" [dependencies] getopts = "0.2.18" 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]] name = "expand" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/expand/src/expand.rs b/src/uu/expand/src/expand.rs index 49e189115..6c8f2e95a 100644 --- a/src/uu/expand/src/expand.rs +++ b/src/uu/expand/src/expand.rs @@ -1,15 +1,11 @@ -#![crate_name = "uu_expand"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Virgile Andreani - * (c) kwantam - * 20150428 updated to work with both UTF-8 and non-UTF-8 encodings - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// This file is part of the uutils coreutils package. +// +// (c) Virgile Andreani +// (c) kwantam +// * 2015-04-28 ~ updated to work with both UTF-8 and non-UTF-8 encodings +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. extern crate getopts; extern crate unicode_width; diff --git a/src/uu/expand/src/main.rs b/src/uu/expand/src/main.rs new file mode 100644 index 000000000..d80b6090f --- /dev/null +++ b/src/uu/expand/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_expand); // spell-checker:ignore procs uucore diff --git a/src/uu/expr/Cargo.toml b/src/uu/expr/Cargo.toml index 275a64c26..5f8069356 100644 --- a/src/uu/expr/Cargo.toml +++ b/src/uu/expr/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "expr" +name = "uu_expr" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_expr" path = "src/expr.rs" [dependencies] libc = "0.2.42" 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]] name = "expr" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/expr/src/expr.rs b/src/uu/expr/src/expr.rs index e2039f918..b30c30f74 100644 --- a/src/uu/expr/src/expr.rs +++ b/src/uu/expr/src/expr.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_expr"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Roman Gafiyatullin - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +//* This file is part of the uutils coreutils package. +//* +//* (c) Roman Gafiyatullin +//* +//* For the full copyright and license information, please view the LICENSE +//* file that was distributed with this source code. extern crate onig; #[macro_use] diff --git a/src/uu/expr/src/main.rs b/src/uu/expr/src/main.rs new file mode 100644 index 000000000..4268865df --- /dev/null +++ b/src/uu/expr/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_expr); // spell-checker:ignore procs uucore diff --git a/src/uu/expr/src/syntax_tree.rs b/src/uu/expr/src/syntax_tree.rs index 914c0ec9c..b8572b2a9 100644 --- a/src/uu/expr/src/syntax_tree.rs +++ b/src/uu/expr/src/syntax_tree.rs @@ -1,11 +1,9 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Roman Gafiyatullin - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +//* This file is part of the uutils coreutils package. +//* +//* (c) Roman Gafiyatullin +//* +//* For the full copyright and license information, please view the LICENSE +//* 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. diff --git a/src/uu/expr/src/tokens.rs b/src/uu/expr/src/tokens.rs index 5ea6e17ee..b3c82f86a 100644 --- a/src/uu/expr/src/tokens.rs +++ b/src/uu/expr/src/tokens.rs @@ -1,11 +1,9 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Roman Gafiyatullin - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +//* This file is part of the uutils coreutils package. +//* +//* (c) Roman Gafiyatullin +//* +//* For the full copyright and license information, please view the LICENSE +//* file that was distributed with this source code. //! //! The following tokens are present in the expr grammar: diff --git a/src/uu/factor/Cargo.toml b/src/uu/factor/Cargo.toml index 8f61ced4a..c4121a939 100644 --- a/src/uu/factor/Cargo.toml +++ b/src/uu/factor/Cargo.toml @@ -1,17 +1,17 @@ [package] -name = "factor" +name = "uu_factor" version = "0.0.1" authors = [] license = "MIT" [lib] -name = "uu_factor" path = "src/factor.rs" [dependencies] 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]] name = "factor" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/factor/build.rs b/src/uu/factor/build.rs index 3a1b7df94..e66afadb0 100644 --- a/src/uu/factor/build.rs +++ b/src/uu/factor/build.rs @@ -1,11 +1,9 @@ -/* -* This file is part of the uutils coreutils package. -* -* (c) kwantam -* -* For the full copyright and license information, please view the LICENSE file -* that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) kwantam +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. //! 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). @@ -34,9 +32,6 @@ mod numeric; mod sieve; -#[path = "../../common/mkmain.rs"] -mod mkmain; - // extended Euclid algorithm // precondition: a does not divide 2^64 fn inv_mod_u64(a: u64) -> Option { @@ -74,8 +69,6 @@ fn inv_mod_u64(a: u64) -> Option { #[cfg_attr(test, allow(dead_code))] fn main() { - mkmain::main(); - let out_dir = env::var("OUT_DIR").unwrap(); let mut file = File::create(&Path::new(&out_dir).join("prime_table.rs")).unwrap(); diff --git a/src/uu/factor/sieve.rs b/src/uu/factor/sieve.rs index 6ae2cac1b..22a5fb00e 100644 --- a/src/uu/factor/sieve.rs +++ b/src/uu/factor/sieve.rs @@ -1,11 +1,9 @@ -/* -* This file is part of the uutils coreutils package. -* -* (c) kwantam -* -* For the full copyright and license information, please view the LICENSE file -* that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) kwantam +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. use std::iter::{Chain, Cycle, Map}; use std::slice::Iter; diff --git a/src/uu/factor/src/factor.rs b/src/uu/factor/src/factor.rs index c3c8dd674..55b0d3780 100644 --- a/src/uu/factor/src/factor.rs +++ b/src/uu/factor/src/factor.rs @@ -1,17 +1,13 @@ -#![crate_name = "uu_factor"] - -/* -* This file is part of the uutils coreutils package. -* -* (c) T. Jameson Little -* (c) Wiktor Kuropatwa -* 20150223 added Pollard rho method implementation -* (c) kwantam -* 20150429 sped up trial division by adding table of prime inverses -* -* For the full copyright and license information, please view the LICENSE file -* that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) T. Jameson Little +// * (c) Wiktor Kuropatwa +// * * 2015-02-23 ~ added Pollard rho method implementation +// * (c) kwantam +// * * 2015-04-29 ~ sped up trial division by adding table of prime inverses +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate rand; diff --git a/src/uu/factor/src/main.rs b/src/uu/factor/src/main.rs new file mode 100644 index 000000000..b251716b5 --- /dev/null +++ b/src/uu/factor/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_factor); // spell-checker:ignore procs uucore diff --git a/src/uu/factor/src/numeric.rs b/src/uu/factor/src/numeric.rs index 95b75e986..a1699951a 100644 --- a/src/uu/factor/src/numeric.rs +++ b/src/uu/factor/src/numeric.rs @@ -1,13 +1,11 @@ -/* -* This file is part of the uutils coreutils package. -* -* (c) Wiktor Kuropatwa -* (c) kwantam -* 20150507 added big_ routines to prevent overflow when num > 2^63 -* -* For the full copyright and license information, please view the LICENSE file -* that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) Wiktor Kuropatwa +// * (c) kwantam +// * * 20150507 ~ added big_ routines to prevent overflow when num > 2^63 +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. use std::mem::swap; use std::num::Wrapping; diff --git a/src/uu/false/Cargo.toml b/src/uu/false/Cargo.toml index 8f0af3062..a796e2212 100644 --- a/src/uu/false/Cargo.toml +++ b/src/uu/false/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "false" +name = "uu_false" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_false" path = "src/false.rs" [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]] name = "false" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/false/src/false.rs b/src/uu/false/src/false.rs index bdfe1c1b6..b7b8a396e 100644 --- a/src/uu/false/src/false.rs +++ b/src/uu/false/src/false.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_false"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. pub fn uumain(_: Vec) -> i32 { 1 diff --git a/src/uu/false/src/main.rs b/src/uu/false/src/main.rs new file mode 100644 index 000000000..0cede3b5e --- /dev/null +++ b/src/uu/false/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_false); // spell-checker:ignore procs uucore diff --git a/src/uu/fmt/Cargo.toml b/src/uu/fmt/Cargo.toml index 76204f0bf..2cd79cf3f 100644 --- a/src/uu/fmt/Cargo.toml +++ b/src/uu/fmt/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "fmt" +name = "uu_fmt" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_fmt" path = "src/fmt.rs" [dependencies] libc = "0.2.42" 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]] name = "fmt" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/fmt/src/fmt.rs b/src/uu/fmt/src/fmt.rs index d078d20a2..ccd374fa7 100644 --- a/src/uu/fmt/src/fmt.rs +++ b/src/uu/fmt/src/fmt.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_fmt"] - -/* - * This file is part of `fmt` from the uutils coreutils package. - * - * (c) kwantam - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of `fmt` from the uutils coreutils package. +// * +// * (c) kwantam +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate unicode_width; diff --git a/src/uu/fmt/src/linebreak.rs b/src/uu/fmt/src/linebreak.rs index 7f1097cdc..8a8b9408e 100644 --- a/src/uu/fmt/src/linebreak.rs +++ b/src/uu/fmt/src/linebreak.rs @@ -1,11 +1,9 @@ -/* - * This file is part of `fmt` from the uutils coreutils package. - * - * (c) kwantam - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of `fmt` from the uutils coreutils package. +// * +// * (c) kwantam +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. use parasplit::{ParaWords, Paragraph, WordInfo}; use std::cmp; diff --git a/src/uu/fmt/src/main.rs b/src/uu/fmt/src/main.rs new file mode 100644 index 000000000..d7e883ba7 --- /dev/null +++ b/src/uu/fmt/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_fmt); // spell-checker:ignore procs uucore diff --git a/src/uu/fmt/src/parasplit.rs b/src/uu/fmt/src/parasplit.rs index f3f49e8a1..e193450fa 100644 --- a/src/uu/fmt/src/parasplit.rs +++ b/src/uu/fmt/src/parasplit.rs @@ -1,11 +1,9 @@ -/* - * This file is part of `fmt` from the uutils coreutils package. - * - * (c) kwantam - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of `fmt` from the uutils coreutils package. +// * +// * (c) kwantam +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. use std::io::{BufRead, Lines}; use std::iter::Peekable; diff --git a/src/uu/fold/Cargo.toml b/src/uu/fold/Cargo.toml index 155d5b7b2..8b0735c45 100644 --- a/src/uu/fold/Cargo.toml +++ b/src/uu/fold/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "fold" +name = "uu_fold" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_fold" path = "src/fold.rs" [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]] name = "fold" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/fold/src/fold.rs b/src/uu/fold/src/fold.rs index 20decdb38..41aabf3b6 100644 --- a/src/uu/fold/src/fold.rs +++ b/src/uu/fold/src/fold.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_fold"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/fold/src/main.rs b/src/uu/fold/src/main.rs new file mode 100644 index 000000000..abdf80211 --- /dev/null +++ b/src/uu/fold/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_fold); // spell-checker:ignore procs uucore diff --git a/src/uu/groups/Cargo.toml b/src/uu/groups/Cargo.toml index e9513227b..2ef847013 100644 --- a/src/uu/groups/Cargo.toml +++ b/src/uu/groups/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "groups" +name = "uu_groups" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_groups" path = "src/groups.rs" [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]] name = "groups" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/groups/src/groups.rs b/src/uu/groups/src/groups.rs index d320382d4..d62d7882c 100644 --- a/src/uu/groups/src/groups.rs +++ b/src/uu/groups/src/groups.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_groups"] - // This file is part of the uutils coreutils package. // // (c) Alan Andrade @@ -7,8 +5,6 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// -// #[macro_use] extern crate uucore; diff --git a/src/uu/groups/src/main.rs b/src/uu/groups/src/main.rs new file mode 100644 index 000000000..0a37ec7f4 --- /dev/null +++ b/src/uu/groups/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_groups); // spell-checker:ignore procs uucore diff --git a/src/uu/hashsum/Cargo.toml b/src/uu/hashsum/Cargo.toml index 0ab2661ce..e69407191 100644 --- a/src/uu/hashsum/Cargo.toml +++ b/src/uu/hashsum/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "hashsum" +name = "uu_hashsum" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_hashsum" path = "src/hashsum.rs" [dependencies] @@ -20,8 +18,9 @@ regex-syntax = "0.6.7" sha1 = "0.6.0" sha2 = "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]] name = "hashsum" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/hashsum/src/hashsum.rs b/src/uu/hashsum/src/hashsum.rs index 259f6eb2e..a1b3f2a8a 100644 --- a/src/uu/hashsum/src/hashsum.rs +++ b/src/uu/hashsum/src/hashsum.rs @@ -1,15 +1,11 @@ -#![crate_name = "uu_hashsum"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * (c) Vsevolod Velichko - * (c) Gil Cottle - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * (c) Vsevolod Velichko +// * (c) Gil Cottle +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate hex; diff --git a/src/uu/hashsum/src/main.rs b/src/uu/hashsum/src/main.rs new file mode 100644 index 000000000..12bd3b393 --- /dev/null +++ b/src/uu/hashsum/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_hashsum); // spell-checker:ignore procs uucore diff --git a/src/uu/head/Cargo.toml b/src/uu/head/Cargo.toml index 467681b99..7a5cb5f40 100644 --- a/src/uu/head/Cargo.toml +++ b/src/uu/head/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "head" +name = "uu_head" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_head" path = "src/head.rs" [dependencies] 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]] name = "head" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/head/src/head.rs b/src/uu/head/src/head.rs index f330c0320..504d26fdc 100644 --- a/src/uu/head/src/head.rs +++ b/src/uu/head/src/head.rs @@ -1,15 +1,11 @@ -#![crate_name = "uu_head"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alan Andrade - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Synced with: https://raw.github.com/avsm/src/master/usr.bin/head/head.c - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alan Andrade +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. +// * +// * Synced with: https://raw.github.com/avsm/src/master/usr.bin/head/head.c #[macro_use] extern crate uucore; diff --git a/src/uu/head/src/main.rs b/src/uu/head/src/main.rs new file mode 100644 index 000000000..fbeb3381e --- /dev/null +++ b/src/uu/head/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_head); // spell-checker:ignore procs uucore diff --git a/src/uu/hostid/Cargo.toml b/src/uu/hostid/Cargo.toml index 69225c667..f8da1c2eb 100644 --- a/src/uu/hostid/Cargo.toml +++ b/src/uu/hostid/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "hostid" +name = "uu_hostid" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_hostid" path = "src/hostid.rs" [dependencies] 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]] name = "hostid" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/hostid/src/hostid.rs b/src/uu/hostid/src/hostid.rs index c4460b8ed..86b39e928 100644 --- a/src/uu/hostid/src/hostid.rs +++ b/src/uu/hostid/src/hostid.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_hostid"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Maciej Dziardziel - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Maciej Dziardziel +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate libc; diff --git a/src/uu/hostid/src/main.rs b/src/uu/hostid/src/main.rs new file mode 100644 index 000000000..12b1178ec --- /dev/null +++ b/src/uu/hostid/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_hostid); // spell-checker:ignore procs uucore diff --git a/src/uu/hostname/Cargo.toml b/src/uu/hostname/Cargo.toml index 19f67f678..564559bdb 100644 --- a/src/uu/hostname/Cargo.toml +++ b/src/uu/hostname/Cargo.toml @@ -1,21 +1,20 @@ [package] -name = "hostname" +name = "uu_hostname" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_hostname" path = "src/hostname.rs" [dependencies] clap = "2.32" libc = "0.2.42" -uucore = { version = "0.0.2", features = [ "wide" ] } -winapi = { version = "0.3", features = ["sysinfoapi", "winsock2"] } -hostname = { version = "^0.3", features = ["set"] } +hostname = { version = "0.3", features = ["set"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["wide"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } +winapi = { version="0.3", features=["sysinfoapi", "winsock2"] } [[bin]] name = "hostname" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/hostname/src/hostname.rs b/src/uu/hostname/src/hostname.rs index 1b6bc06b9..326bad340 100644 --- a/src/uu/hostname/src/hostname.rs +++ b/src/uu/hostname/src/hostname.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_hostname"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alan Andrade - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alan Andrade +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate clap; extern crate hostname; diff --git a/src/uu/hostname/src/main.rs b/src/uu/hostname/src/main.rs new file mode 100644 index 000000000..a483a8b1a --- /dev/null +++ b/src/uu/hostname/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_hostname); // spell-checker:ignore procs uucore diff --git a/src/uu/id/Cargo.toml b/src/uu/id/Cargo.toml index 34df8250d..2841bf360 100644 --- a/src/uu/id/Cargo.toml +++ b/src/uu/id/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "id" +name = "uu_id" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_id" path = "src/id.rs" [dependencies] -uucore = { version = "0.0.2", features = ["entries", "process"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "process"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "id" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/id/src/id.rs b/src/uu/id/src/id.rs index d0d6a64f7..f34839950 100644 --- a/src/uu/id/src/id.rs +++ b/src/uu/id/src/id.rs @@ -1,4 +1,3 @@ -#![crate_name = "uu_id"] // This file is part of the uutils coreutils package. // // (c) Alan Andrade @@ -10,7 +9,7 @@ // Synced with: // http://ftp-archive.freebsd.org/mirror/FreeBSD-Archive/old-releases/i386/1.0-RELEASE/ports/shellutils/src/id.c // http://www.opensource.apple.com/source/shell_cmds/shell_cmds-118/id/id.c -// + #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/src/uu/id/src/main.rs b/src/uu/id/src/main.rs new file mode 100644 index 000000000..389e2deff --- /dev/null +++ b/src/uu/id/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_id); // spell-checker:ignore procs uucore diff --git a/src/uu/install/Cargo.toml b/src/uu/install/Cargo.toml index e50cc69f7..2b7341edc 100644 --- a/src/uu/install/Cargo.toml +++ b/src/uu/install/Cargo.toml @@ -1,22 +1,21 @@ [package] -name = "install" +name = "uu_install" version = "0.0.1" authors = ["Ben Eills "] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_install" path = "src/install.rs" [dependencies] getopts = "0.2.18" libc = ">= 0.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" } [dev-dependencies] time = "0.1.40" [[bin]] name = "install" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/install/src/install.rs b/src/uu/install/src/install.rs index 3e91ae1db..365ecd1dc 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_install"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Ben Eills - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Ben Eills +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/install/src/main.rs b/src/uu/install/src/main.rs new file mode 100644 index 000000000..289079daf --- /dev/null +++ b/src/uu/install/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_install); // spell-checker:ignore procs uucore diff --git a/src/uu/join/Cargo.toml b/src/uu/join/Cargo.toml index 5d3653a3b..0fbb24b70 100644 --- a/src/uu/join/Cargo.toml +++ b/src/uu/join/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "join" +name = "uu_join" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_join" path = "src/join.rs" [dependencies] 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]] name = "join" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/join/src/join.rs b/src/uu/join/src/join.rs index d56269244..861ad598e 100644 --- a/src/uu/join/src/join.rs +++ b/src/uu/join/src/join.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_join"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Konstantin Pospelov - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Konstantin Pospelov +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate clap; diff --git a/src/uu/join/src/main.rs b/src/uu/join/src/main.rs new file mode 100644 index 000000000..75be18875 --- /dev/null +++ b/src/uu/join/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_join); // spell-checker:ignore procs uucore diff --git a/src/uu/kill/Cargo.toml b/src/uu/kill/Cargo.toml index 4c7a93591..bea863e9a 100644 --- a/src/uu/kill/Cargo.toml +++ b/src/uu/kill/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "kill" +name = "uu_kill" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_kill" path = "src/kill.rs" [dependencies] libc = "0.2.42" -uucore = { version = "0.0.2", features = ["signals"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["signals"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "kill" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/kill/src/kill.rs b/src/uu/kill/src/kill.rs index f38fbc0fb..e7d5e9869 100644 --- a/src/uu/kill/src/kill.rs +++ b/src/uu/kill/src/kill.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_kill"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Maciej Dziardziel - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Maciej Dziardziel +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate libc; diff --git a/src/uu/kill/src/main.rs b/src/uu/kill/src/main.rs new file mode 100644 index 000000000..c9f639967 --- /dev/null +++ b/src/uu/kill/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_kill); // spell-checker:ignore procs uucore diff --git a/src/uu/link/Cargo.toml b/src/uu/link/Cargo.toml index e405b4e2a..634409e78 100644 --- a/src/uu/link/Cargo.toml +++ b/src/uu/link/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "link" +name = "uu_link" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_link" path = "src/link.rs" [dependencies] 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]] name = "link" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/link/src/link.rs b/src/uu/link/src/link.rs index ae5993d52..9cf21ccb6 100644 --- a/src/uu/link/src/link.rs +++ b/src/uu/link/src/link.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_link"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Gehring +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/link/src/main.rs b/src/uu/link/src/main.rs new file mode 100644 index 000000000..d837b4278 --- /dev/null +++ b/src/uu/link/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_link); // spell-checker:ignore procs uucore diff --git a/src/uu/ln/Cargo.toml b/src/uu/ln/Cargo.toml index e7f0170ed..5109376c8 100644 --- a/src/uu/ln/Cargo.toml +++ b/src/uu/ln/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "ln" +name = "uu_ln" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_ln" path = "src/ln.rs" [dependencies] 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]] name = "ln" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/ln/src/ln.rs b/src/uu/ln/src/ln.rs index 9d8dec511..1e25b870b 100644 --- a/src/uu/ln/src/ln.rs +++ b/src/uu/ln/src/ln.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_ln"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Joseph Crail - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Joseph Crail +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. #[macro_use] extern crate uucore; diff --git a/src/uu/ln/src/main.rs b/src/uu/ln/src/main.rs new file mode 100644 index 000000000..de14d10bd --- /dev/null +++ b/src/uu/ln/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_ln); // spell-checker:ignore procs uucore diff --git a/src/uu/logname/Cargo.toml b/src/uu/logname/Cargo.toml index 83d793cf6..8ace8f70c 100644 --- a/src/uu/logname/Cargo.toml +++ b/src/uu/logname/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "logname" +name = "uu_logname" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_logname" path = "src/logname.rs" [dependencies] 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]] name = "logname" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/logname/src/logname.rs b/src/uu/logname/src/logname.rs index f0551c021..b5ff07cf8 100644 --- a/src/uu/logname/src/logname.rs +++ b/src/uu/logname/src/logname.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_logname"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Benoit Benedetti - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Benoit Benedetti +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: logname (GNU coreutils) 8.22 */ diff --git a/src/uu/logname/src/main.rs b/src/uu/logname/src/main.rs new file mode 100644 index 000000000..48a4063f1 --- /dev/null +++ b/src/uu/logname/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_logname); // spell-checker:ignore procs uucore diff --git a/src/uu/ls/Cargo.toml b/src/uu/ls/Cargo.toml index c713729b5..6e7df2e6d 100644 --- a/src/uu/ls/Cargo.toml +++ b/src/uu/ls/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "ls" +name = "uu_ls" version = "0.0.1" authors = ["Jeremiah Peschka "] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_ls" path = "src/ls.rs" [dependencies] @@ -18,8 +16,9 @@ term_grid = "0.1.5" termsize = "0.1.6" time = "0.1.40" unicode-width = "0.1.5" -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" } [[bin]] name = "ls" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index d429dd2d3..c121b6280 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_ls"] - // This file is part of the uutils coreutils package. // // (c) Jeremiah Peschka // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// extern crate getopts; #[cfg(unix)] diff --git a/src/uu/ls/src/main.rs b/src/uu/ls/src/main.rs new file mode 100644 index 000000000..f45314577 --- /dev/null +++ b/src/uu/ls/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_ls); // spell-checker:ignore procs uucore diff --git a/src/uu/mkdir/Cargo.toml b/src/uu/mkdir/Cargo.toml index 1c050722a..f039c8846 100644 --- a/src/uu/mkdir/Cargo.toml +++ b/src/uu/mkdir/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "mkdir" +name = "uu_mkdir" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_mkdir" path = "src/mkdir.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = "0.0.2" +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" } [[bin]] name = "mkdir" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/mkdir/src/main.rs b/src/uu/mkdir/src/main.rs new file mode 100644 index 000000000..3850113b9 --- /dev/null +++ b/src/uu/mkdir/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_mkdir); // spell-checker:ignore procs uucore diff --git a/src/uu/mkdir/src/mkdir.rs b/src/uu/mkdir/src/mkdir.rs index 85ab67c48..c287ecddc 100644 --- a/src/uu/mkdir/src/mkdir.rs +++ b/src/uu/mkdir/src/mkdir.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_mkdir"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Nicholas Juszczak - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Nicholas Juszczak +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/mkfifo/Cargo.toml b/src/uu/mkfifo/Cargo.toml index 25e07fa28..cbb3289b2 100644 --- a/src/uu/mkfifo/Cargo.toml +++ b/src/uu/mkfifo/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "mkfifo" +name = "uu_mkfifo" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_mkfifo" path = "src/mkfifo.rs" [dependencies] getopts = "0.2.18" 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]] name = "mkfifo" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/mkfifo/src/main.rs b/src/uu/mkfifo/src/main.rs new file mode 100644 index 000000000..489dc8ffd --- /dev/null +++ b/src/uu/mkfifo/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_mkfifo); // spell-checker:ignore procs uucore mkfifo diff --git a/src/uu/mkfifo/src/mkfifo.rs b/src/uu/mkfifo/src/mkfifo.rs index 5c5107112..3bc424c31 100644 --- a/src/uu/mkfifo/src/mkfifo.rs +++ b/src/uu/mkfifo/src/mkfifo.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_mkfifo"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Gehring +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/mknod/Cargo.toml b/src/uu/mknod/Cargo.toml index 090143353..7d5dcdfcd 100644 --- a/src/uu/mknod/Cargo.toml +++ b/src/uu/mknod/Cargo.toml @@ -1,9 +1,8 @@ [package] -name = "mknod" +name = "uu_mknod" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] name = "uu_mknod" @@ -12,8 +11,9 @@ path = "src/mknod.rs" [dependencies] getopts = "0.2.18" 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]] name = "mknod" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/mknod/src/main.rs b/src/uu/mknod/src/main.rs new file mode 100644 index 000000000..f3878199b --- /dev/null +++ b/src/uu/mknod/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_mknod); // spell-checker:ignore procs uucore mknod diff --git a/src/uu/mknod/src/mknod.rs b/src/uu/mknod/src/mknod.rs index 172be4892..c2a27feb3 100644 --- a/src/uu/mknod/src/mknod.rs +++ b/src/uu/mknod/src/mknod.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_mknod"] - // This file is part of the uutils coreutils package. // // (c) Jian Zeng // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// extern crate getopts; extern crate libc; diff --git a/src/uu/mktemp/Cargo.toml b/src/uu/mktemp/Cargo.toml index 8d49b3cac..a772fe73d 100644 --- a/src/uu/mktemp/Cargo.toml +++ b/src/uu/mktemp/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "mktemp" +name = "uu_mktemp" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_mktemp" path = "src/mktemp.rs" [dependencies] getopts = "0.2.18" rand = "0.5" tempfile = "2.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]] name = "mktemp" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/mktemp/src/main.rs b/src/uu/mktemp/src/main.rs new file mode 100644 index 000000000..217f09372 --- /dev/null +++ b/src/uu/mktemp/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_mktemp); // spell-checker:ignore procs uucore mktemp diff --git a/src/uu/mktemp/src/mktemp.rs b/src/uu/mktemp/src/mktemp.rs index 5e200dbee..3320112da 100644 --- a/src/uu/mktemp/src/mktemp.rs +++ b/src/uu/mktemp/src/mktemp.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_mktemp"] - // This file is part of the uutils coreutils package. // // (c) Sunrin SHIMURA @@ -7,7 +5,6 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// extern crate getopts; extern crate rand; diff --git a/src/uu/more/Cargo.toml b/src/uu/more/Cargo.toml index 87125d6f7..5e4dbb390 100644 --- a/src/uu/more/Cargo.toml +++ b/src/uu/more/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "more" +name = "uu_more" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_more" path = "src/more.rs" [dependencies] getopts = "0.2.18" -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" } [target.'cfg(target_os = "redox")'.dependencies] redox_termios = "0.1" @@ -22,4 +21,4 @@ nix = "0.8.1" [[bin]] name = "more" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/more/src/main.rs b/src/uu/more/src/main.rs new file mode 100644 index 000000000..1f3137265 --- /dev/null +++ b/src/uu/more/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_more); // spell-checker:ignore procs uucore diff --git a/src/uu/more/src/more.rs b/src/uu/more/src/more.rs index 32350e58e..46d0f49a9 100644 --- a/src/uu/more/src/more.rs +++ b/src/uu/more/src/more.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_more"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Martin Kysel - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Martin Kysel +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate getopts; diff --git a/src/uu/mv/Cargo.toml b/src/uu/mv/Cargo.toml index 03afd1a0c..c7d85bc80 100644 --- a/src/uu/mv/Cargo.toml +++ b/src/uu/mv/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "mv" +name = "uu_mv" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_mv" path = "src/mv.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" fs_extra = "1.1.0" +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]] name = "mv" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/mv/src/main.rs b/src/uu/mv/src/main.rs new file mode 100644 index 000000000..c7e321234 --- /dev/null +++ b/src/uu/mv/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_mv); // spell-checker:ignore procs uucore diff --git a/src/uu/mv/src/mv.rs b/src/uu/mv/src/mv.rs index af0878ea9..2fe68e611 100644 --- a/src/uu/mv/src/mv.rs +++ b/src/uu/mv/src/mv.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_mv"] - // This file is part of the uutils coreutils package. // // (c) Orvar Segerström @@ -7,7 +5,6 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// extern crate fs_extra; extern crate getopts; diff --git a/src/uu/nice/Cargo.toml b/src/uu/nice/Cargo.toml index d09a7709f..b2b914e6f 100644 --- a/src/uu/nice/Cargo.toml +++ b/src/uu/nice/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "nice" +name = "uu_nice" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_nice" path = "src/nice.rs" [dependencies] getopts = "0.2.18" 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]] name = "nice" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/nice/src/main.rs b/src/uu/nice/src/main.rs new file mode 100644 index 000000000..25da035aa --- /dev/null +++ b/src/uu/nice/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_nice); // spell-checker:ignore procs uucore diff --git a/src/uu/nice/src/nice.rs b/src/uu/nice/src/nice.rs index 50826a60c..252160fc3 100644 --- a/src/uu/nice/src/nice.rs +++ b/src/uu/nice/src/nice.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_nice"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/nl/Cargo.toml b/src/uu/nl/Cargo.toml index 1f582aae5..dc48ae52f 100644 --- a/src/uu/nl/Cargo.toml +++ b/src/uu/nl/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "nl" +name = "uu_nl" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_nl" path = "src/nl.rs" [dependencies] @@ -16,8 +14,9 @@ libc = "0.2.42" memchr = "2.2.0" regex = "1.0.1" regex-syntax = "0.6.7" -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]] name = "nl" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/nl/src/main.rs b/src/uu/nl/src/main.rs new file mode 100644 index 000000000..fac355069 --- /dev/null +++ b/src/uu/nl/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_nl); // spell-checker:ignore procs uucore diff --git a/src/uu/nl/src/nl.rs b/src/uu/nl/src/nl.rs index be43101e1..ee0d569b3 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_nl"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Tobias Bohumir Schottdorf - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Tobias Bohumir Schottdorf +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. +// * extern crate aho_corasick; extern crate getopts; diff --git a/src/uu/nohup/Cargo.toml b/src/uu/nohup/Cargo.toml index 68afca8a0..d6e189055 100644 --- a/src/uu/nohup/Cargo.toml +++ b/src/uu/nohup/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "nohup" +name = "uu_nohup" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_nohup" path = "src/nohup.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -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" } [[bin]] name = "nohup" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/nohup/src/main.rs b/src/uu/nohup/src/main.rs new file mode 100644 index 000000000..d46ceb7cb --- /dev/null +++ b/src/uu/nohup/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_nohup); // spell-checker:ignore procs uucore nohup diff --git a/src/uu/nohup/src/nohup.rs b/src/uu/nohup/src/nohup.rs index 574cd82fb..c2b79e0e4 100644 --- a/src/uu/nohup/src/nohup.rs +++ b/src/uu/nohup/src/nohup.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_nohup"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) 2014 Vsevolod Velichko - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) 2014 Vsevolod Velichko +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/nproc/Cargo.toml b/src/uu/nproc/Cargo.toml index f80fb727c..61aaffabd 100644 --- a/src/uu/nproc/Cargo.toml +++ b/src/uu/nproc/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "nproc" +name = "uu_nproc" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_nproc" path = "src/nproc.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" num_cpus = "1.10" -uucore = "0.0.2" +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" } [[bin]] name = "nproc" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/nproc/src/main.rs b/src/uu/nproc/src/main.rs new file mode 100644 index 000000000..7650cce09 --- /dev/null +++ b/src/uu/nproc/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_nproc); // spell-checker:ignore procs uucore nproc diff --git a/src/uu/nproc/src/nproc.rs b/src/uu/nproc/src/nproc.rs index 3d6b9151c..7f1849852 100644 --- a/src/uu/nproc/src/nproc.rs +++ b/src/uu/nproc/src/nproc.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_nproc"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Gehring +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate num_cpus; diff --git a/src/uu/numfmt/Cargo.toml b/src/uu/numfmt/Cargo.toml index cd56f2dfc..71e5ea146 100644 --- a/src/uu/numfmt/Cargo.toml +++ b/src/uu/numfmt/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "numfmt" +name = "uu_numfmt" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_numfmt" path = "src/numfmt.rs" [dependencies] getopts = "0.2.18" -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]] name = "numfmt" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/numfmt/src/main.rs b/src/uu/numfmt/src/main.rs new file mode 100644 index 000000000..084d494f2 --- /dev/null +++ b/src/uu/numfmt/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_numfmt); // spell-checker:ignore procs uucore numfmt diff --git a/src/uu/numfmt/src/numfmt.rs b/src/uu/numfmt/src/numfmt.rs index 164e83ff0..46b4667a2 100644 --- a/src/uu/numfmt/src/numfmt.rs +++ b/src/uu/numfmt/src/numfmt.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_numfmt"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Yury Krivopalov - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Yury Krivopalov +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/od/Cargo.toml b/src/uu/od/Cargo.toml index 2fc92c2a8..4e015bb2d 100644 --- a/src/uu/od/Cargo.toml +++ b/src/uu/od/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "od" +name = "uu_od" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_od" path = "src/od.rs" [dependencies] @@ -14,8 +12,9 @@ byteorder = "1.3.2" getopts = "0.2.18" half = "1.1.1" 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]] name = "od" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/od/src/main.rs b/src/uu/od/src/main.rs new file mode 100644 index 000000000..d5e96180c --- /dev/null +++ b/src/uu/od/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_od); // spell-checker:ignore procs uucore diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index c8982c630..653313966 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_od"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Ben Hirsch - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Ben Hirsch +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate byteorder; extern crate getopts; diff --git a/src/uu/paste/Cargo.toml b/src/uu/paste/Cargo.toml index 6673311a4..c65704f7d 100644 --- a/src/uu/paste/Cargo.toml +++ b/src/uu/paste/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "paste" +name = "uu_paste" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_paste" path = "src/paste.rs" [dependencies] getopts = "0.2.18" -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]] name = "paste" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/paste/src/main.rs b/src/uu/paste/src/main.rs new file mode 100644 index 000000000..bb9b25a68 --- /dev/null +++ b/src/uu/paste/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_paste); // spell-checker:ignore procs uucore diff --git a/src/uu/paste/src/paste.rs b/src/uu/paste/src/paste.rs index 3a1e209b8..2f2b6eff7 100644 --- a/src/uu/paste/src/paste.rs +++ b/src/uu/paste/src/paste.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_paste"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/pathchk/Cargo.toml b/src/uu/pathchk/Cargo.toml index c554356cd..93e8a1a7e 100644 --- a/src/uu/pathchk/Cargo.toml +++ b/src/uu/pathchk/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "pathchk" +name = "uu_pathchk" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_pathchk" path = "src/pathchk.rs" [dependencies] getopts = "0.2.18" 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]] name = "pathchk" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/pathchk/src/main.rs b/src/uu/pathchk/src/main.rs new file mode 100644 index 000000000..e16353196 --- /dev/null +++ b/src/uu/pathchk/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_pathchk); // spell-checker:ignore procs uucore pathchk diff --git a/src/uu/pathchk/src/pathchk.rs b/src/uu/pathchk/src/pathchk.rs index 36bb591b1..b0152d390 100644 --- a/src/uu/pathchk/src/pathchk.rs +++ b/src/uu/pathchk/src/pathchk.rs @@ -1,14 +1,11 @@ #![allow(unused_must_use)] // because we of writeln! -#![crate_name = "uu_pathchk"] -/* - * This file is part of the uutils coreutils package. - * - * (c) Inokentiy Babushkin - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Inokentiy Babushkin +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/pinky/Cargo.toml b/src/uu/pinky/Cargo.toml index 6bb45200f..c90e063bf 100644 --- a/src/uu/pinky/Cargo.toml +++ b/src/uu/pinky/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "pinky" +name = "uu_pinky" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_pinky" path = "src/pinky.rs" [dependencies] -uucore = { version = "0.0.2", features = ["utmpx", "entries"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx", "entries"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "pinky" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/pinky/src/main.rs b/src/uu/pinky/src/main.rs new file mode 100644 index 000000000..1bf1e618a --- /dev/null +++ b/src/uu/pinky/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_pinky); // spell-checker:ignore procs uucore diff --git a/src/uu/pinky/src/pinky.rs b/src/uu/pinky/src/pinky.rs index a3e506ad7..ce509dbe1 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -1,11 +1,10 @@ -#![crate_name = "uu_pinky"] // This file is part of the uutils coreutils package. // // (c) Jian Zeng // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// + #![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] diff --git a/src/uu/printenv/Cargo.toml b/src/uu/printenv/Cargo.toml index 473adfab4..1e19d5078 100644 --- a/src/uu/printenv/Cargo.toml +++ b/src/uu/printenv/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "printenv" +name = "uu_printenv" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_printenv" path = "src/printenv.rs" [dependencies] getopts = "0.2.18" -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]] name = "printenv" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/printenv/src/main.rs b/src/uu/printenv/src/main.rs new file mode 100644 index 000000000..328c3b485 --- /dev/null +++ b/src/uu/printenv/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_printenv); // spell-checker:ignore procs uucore printenv diff --git a/src/uu/printenv/src/printenv.rs b/src/uu/printenv/src/printenv.rs index 56ca0a653..10b64213e 100644 --- a/src/uu/printenv/src/printenv.rs +++ b/src/uu/printenv/src/printenv.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_printenv"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: printenv (GNU coreutils) 8.13 */ diff --git a/src/uu/printf/Cargo.toml b/src/uu/printf/Cargo.toml index 27eee8dab..cca26672f 100644 --- a/src/uu/printf/Cargo.toml +++ b/src/uu/printf/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "printf" +name = "uu_printf" version = "0.0.1" authors = ["Nathan Ross"] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_printf" path = "src/printf.rs" [dependencies] itertools = "0.8.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]] name = "printf" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/printf/src/main.rs b/src/uu/printf/src/main.rs new file mode 100644 index 000000000..aa9a45be5 --- /dev/null +++ b/src/uu/printf/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_printf); // spell-checker:ignore procs uucore printf diff --git a/src/uu/printf/src/printf.rs b/src/uu/printf/src/printf.rs index 8bde95b74..8188fddde 100644 --- a/src/uu/printf/src/printf.rs +++ b/src/uu/printf/src/printf.rs @@ -1,4 +1,3 @@ -#![crate_name = "uu_printf"] #![allow(dead_code)] extern crate itertools; diff --git a/src/uu/ptx/Cargo.toml b/src/uu/ptx/Cargo.toml index e3d6135ff..e229c9474 100644 --- a/src/uu/ptx/Cargo.toml +++ b/src/uu/ptx/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "ptx" +name = "uu_ptx" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_ptx" path = "src/ptx.rs" [dependencies] @@ -16,8 +14,9 @@ libc = "0.2.42" memchr = "2.2.0" regex = "1.0.1" regex-syntax = "0.6.7" -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]] name = "ptx" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/ptx/src/main.rs b/src/uu/ptx/src/main.rs new file mode 100644 index 000000000..0b235443a --- /dev/null +++ b/src/uu/ptx/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_ptx); // spell-checker:ignore procs uucore diff --git a/src/uu/ptx/src/ptx.rs b/src/uu/ptx/src/ptx.rs index fcdc9499c..e333dec5a 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_ptx"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Dorota Kapturkiewicz - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Dorota Kapturkiewicz +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate aho_corasick; extern crate getopts; diff --git a/src/uu/pwd/Cargo.toml b/src/uu/pwd/Cargo.toml index 328fda9e8..48220f819 100644 --- a/src/uu/pwd/Cargo.toml +++ b/src/uu/pwd/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "pwd" +name = "uu_pwd" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_pwd" path = "src/pwd.rs" [dependencies] getopts = "0.2.18" -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]] name = "pwd" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/pwd/src/main.rs b/src/uu/pwd/src/main.rs new file mode 100644 index 000000000..4445b7891 --- /dev/null +++ b/src/uu/pwd/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_pwd); // spell-checker:ignore procs uucore diff --git a/src/uu/pwd/src/pwd.rs b/src/uu/pwd/src/pwd.rs index 2eff91fa6..3b678b756 100644 --- a/src/uu/pwd/src/pwd.rs +++ b/src/uu/pwd/src/pwd.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_pwd"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Derek Chiang - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Derek Chiang +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/readlink/Cargo.toml b/src/uu/readlink/Cargo.toml index 39b88f0a8..5ac7d1fad 100644 --- a/src/uu/readlink/Cargo.toml +++ b/src/uu/readlink/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "readlink" +name = "uu_readlink" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_readlink" path = "src/readlink.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -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" } [[bin]] name = "readlink" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/readlink/src/main.rs b/src/uu/readlink/src/main.rs new file mode 100644 index 000000000..e5aab3cb6 --- /dev/null +++ b/src/uu/readlink/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_readlink); // spell-checker:ignore procs uucore readlink diff --git a/src/uu/readlink/src/readlink.rs b/src/uu/readlink/src/readlink.rs index 47bea285c..5724fc8a6 100644 --- a/src/uu/readlink/src/readlink.rs +++ b/src/uu/readlink/src/readlink.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_readlink"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Haitao Li - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Haitao Li +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/realpath/Cargo.toml b/src/uu/realpath/Cargo.toml index c79c5f5a7..4f6d375c7 100644 --- a/src/uu/realpath/Cargo.toml +++ b/src/uu/realpath/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "realpath" +name = "uu_realpath" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_realpath" path = "src/realpath.rs" [dependencies] getopts = "0.2.18" -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" } [[bin]] name = "realpath" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/realpath/src/main.rs b/src/uu/realpath/src/main.rs new file mode 100644 index 000000000..3a74bc5f6 --- /dev/null +++ b/src/uu/realpath/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_realpath); // spell-checker:ignore procs uucore realpath diff --git a/src/uu/realpath/src/realpath.rs b/src/uu/realpath/src/realpath.rs index 523804022..c63d995d4 100644 --- a/src/uu/realpath/src/realpath.rs +++ b/src/uu/realpath/src/realpath.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_realpath"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) 2014 Vsevolod Velichko - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) 2014 Vsevolod Velichko +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/relpath/Cargo.toml b/src/uu/relpath/Cargo.toml index 6bb6cb4de..bb1caad43 100644 --- a/src/uu/relpath/Cargo.toml +++ b/src/uu/relpath/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "relpath" +name = "uu_relpath" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_relpath" path = "src/relpath.rs" [dependencies] getopts = "0.2.18" -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" } [[bin]] name = "relpath" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/relpath/src/main.rs b/src/uu/relpath/src/main.rs new file mode 100644 index 000000000..a5f866bb2 --- /dev/null +++ b/src/uu/relpath/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_relpath); // spell-checker:ignore procs uucore relpath diff --git a/src/uu/relpath/src/relpath.rs b/src/uu/relpath/src/relpath.rs index b2ed8c251..c04918294 100644 --- a/src/uu/relpath/src/relpath.rs +++ b/src/uu/relpath/src/relpath.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_relpath"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) 2014 Vsevolod Velichko - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) 2014 Vsevolod Velichko +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/rm/Cargo.toml b/src/uu/rm/Cargo.toml index bbaaaea53..711c82849 100644 --- a/src/uu/rm/Cargo.toml +++ b/src/uu/rm/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "rm" +name = "uu_rm" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_rm" path = "src/rm.rs" [dependencies] getopts = "0.2.18" walkdir = "2.2.8" remove_dir_all = "0.5.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]] name = "rm" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/rm/src/main.rs b/src/uu/rm/src/main.rs new file mode 100644 index 000000000..ebb998c39 --- /dev/null +++ b/src/uu/rm/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_rm); // spell-checker:ignore procs uucore diff --git a/src/uu/rm/src/rm.rs b/src/uu/rm/src/rm.rs index b3c241a8d..057ed4307 100644 --- a/src/uu/rm/src/rm.rs +++ b/src/uu/rm/src/rm.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_rm"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate remove_dir_all; diff --git a/src/uu/rmdir/Cargo.toml b/src/uu/rmdir/Cargo.toml index 233e9bdc8..3f2cd6071 100644 --- a/src/uu/rmdir/Cargo.toml +++ b/src/uu/rmdir/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "rmdir" +name = "uu_rmdir" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_rmdir" path = "src/rmdir.rs" [dependencies] getopts = "0.2.18" -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]] name = "rmdir" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/rmdir/src/main.rs b/src/uu/rmdir/src/main.rs new file mode 100644 index 000000000..ab1939b4a --- /dev/null +++ b/src/uu/rmdir/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_rmdir); // spell-checker:ignore procs uucore rmdir diff --git a/src/uu/rmdir/src/rmdir.rs b/src/uu/rmdir/src/rmdir.rs index 2ef50e5bd..881a79d82 100644 --- a/src/uu/rmdir/src/rmdir.rs +++ b/src/uu/rmdir/src/rmdir.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_rmdir"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/seq/Cargo.toml b/src/uu/seq/Cargo.toml index c1c38b926..896c8dc48 100644 --- a/src/uu/seq/Cargo.toml +++ b/src/uu/seq/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "seq" +name = "uu_seq" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_seq" path = "src/seq.rs" [dependencies] getopts = "0.2.18" -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]] name = "seq" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/seq/src/main.rs b/src/uu/seq/src/main.rs new file mode 100644 index 000000000..c984ed61a --- /dev/null +++ b/src/uu/seq/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_seq); // spell-checker:ignore procs uucore diff --git a/src/uu/seq/src/seq.rs b/src/uu/seq/src/seq.rs index a8a4f6ec4..d4a93e904 100644 --- a/src/uu/seq/src/seq.rs +++ b/src/uu/seq/src/seq.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_seq"] - // TODO: Make -w flag work with decimals // TODO: Support -f flag diff --git a/src/uu/shred/Cargo.toml b/src/uu/shred/Cargo.toml index e23dce935..e5f60bc32 100644 --- a/src/uu/shred/Cargo.toml +++ b/src/uu/shred/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "shred" +name = "uu_shred" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_shred" path = "src/shred.rs" [dependencies] @@ -15,8 +13,9 @@ getopts = "0.2.18" libc = "0.2.42" rand = "0.5" 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]] name = "shred" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/shred/src/main.rs b/src/uu/shred/src/main.rs new file mode 100644 index 000000000..2880499eb --- /dev/null +++ b/src/uu/shred/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_shred); // spell-checker:ignore procs uucore diff --git a/src/uu/shred/src/shred.rs b/src/uu/shred/src/shred.rs index 80b040539..d6daa13f9 100644 --- a/src/uu/shred/src/shred.rs +++ b/src/uu/shred/src/shred.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_shred"] - -/* -* This file is part of the uutils coreutils package. -* -* (c) Michael Rosenberg <42micro@gmail.com> -* (c) Fort -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Rosenberg <42micro@gmail.com> +// * (c) Fort +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate rand; diff --git a/src/uu/shuf/Cargo.toml b/src/uu/shuf/Cargo.toml index 755b3c207..d580ce69c 100644 --- a/src/uu/shuf/Cargo.toml +++ b/src/uu/shuf/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "shuf" +name = "uu_shuf" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_shuf" path = "src/shuf.rs" [dependencies] getopts = "0.2.18" 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]] name = "shuf" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/shuf/src/main.rs b/src/uu/shuf/src/main.rs new file mode 100644 index 000000000..1ecff5d21 --- /dev/null +++ b/src/uu/shuf/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_shuf); // spell-checker:ignore procs uucore shuf diff --git a/src/uu/shuf/src/shuf.rs b/src/uu/shuf/src/shuf.rs index 7843ff565..112f42681 100644 --- a/src/uu/shuf/src/shuf.rs +++ b/src/uu/shuf/src/shuf.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_shuf"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate rand; diff --git a/src/uu/sleep/Cargo.toml b/src/uu/sleep/Cargo.toml index ccfcf092b..a93dd5438 100644 --- a/src/uu/sleep/Cargo.toml +++ b/src/uu/sleep/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "sleep" +name = "uu_sleep" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_sleep" path = "src/sleep.rs" [dependencies] getopts = "0.2.18" -uucore = { version = "0.0.2", features = ["parse_time"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["parse_time"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "sleep" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/sleep/src/main.rs b/src/uu/sleep/src/main.rs new file mode 100644 index 000000000..46ecd0969 --- /dev/null +++ b/src/uu/sleep/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_sleep); // spell-checker:ignore procs uucore diff --git a/src/uu/sleep/src/sleep.rs b/src/uu/sleep/src/sleep.rs index ca05560b7..fbab77dc5 100644 --- a/src/uu/sleep/src/sleep.rs +++ b/src/uu/sleep/src/sleep.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_sleep"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/sort/Cargo.toml b/src/uu/sort/Cargo.toml index 9795c7cb3..949e72d9d 100644 --- a/src/uu/sort/Cargo.toml +++ b/src/uu/sort/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "sort" +name = "uu_sort" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_sort" path = "src/sort.rs" [dependencies] getopts = "0.2.18" itertools = "0.8.0" semver = "0.9.0" -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" } [[bin]] name = "sort" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/sort/src/main.rs b/src/uu/sort/src/main.rs new file mode 100644 index 000000000..a59375b2f --- /dev/null +++ b/src/uu/sort/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_sort); // spell-checker:ignore procs uucore diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs index 4d166e21b..f83915933 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_sort"] -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Yin - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Yin +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. #![allow(dead_code)] extern crate getopts; diff --git a/src/uu/split/Cargo.toml b/src/uu/split/Cargo.toml index a2904515d..afdc46c15 100644 --- a/src/uu/split/Cargo.toml +++ b/src/uu/split/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "split" +name = "uu_split" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_split" path = "src/split.rs" [dependencies] getopts = "0.2.18" -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]] name = "split" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/split/README.md b/src/uu/split/README.md index 582c9970a..112a4416f 100644 --- a/src/uu/split/README.md +++ b/src/uu/split/README.md @@ -3,7 +3,9 @@ ## Missing Features ### Flags -* `--verbose` - created file printing is implemented, don't know if there is anything else + +* [ ] `--verbose` - created file printing is implemented, don't know if there is anything else ## Possible Optimizations -* Use slice (`[u8]`) directly as the `control.current_line`. + +* [ ] Use slice (`[u8]`) directly as the `control.current_line`. diff --git a/src/uu/split/src/main.rs b/src/uu/split/src/main.rs new file mode 100644 index 000000000..2f0640db4 --- /dev/null +++ b/src/uu/split/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_split); // spell-checker:ignore procs uucore diff --git a/src/uu/split/src/split.rs b/src/uu/split/src/split.rs index e06bb33f8..2a6a40c51 100644 --- a/src/uu/split/src/split.rs +++ b/src/uu/split/src/split.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_split"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Akira Hayakawa - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Akira Hayakawa +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/stat/Cargo.toml b/src/uu/stat/Cargo.toml index 4fc924645..5e8583f41 100644 --- a/src/uu/stat/Cargo.toml +++ b/src/uu/stat/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "stat" +name = "uu_stat" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_stat" path = "src/stat.rs" [dependencies] getopts = "0.2.18" time = "0.1.40" -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]] name = "stat" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/stat/src/main.rs b/src/uu/stat/src/main.rs new file mode 100644 index 000000000..6e483c850 --- /dev/null +++ b/src/uu/stat/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_stat); // spell-checker:ignore procs uucore diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index 3493452fd..8f34f8df5 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -1,12 +1,9 @@ -#![crate_name = "uu_stat"] - // This file is part of the uutils coreutils package. // // (c) Jian Zeng // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// extern crate getopts; use getopts::Options; diff --git a/src/uu/stdbuf/Cargo.toml b/src/uu/stdbuf/Cargo.toml index f59d252f4..674b974a3 100644 --- a/src/uu/stdbuf/Cargo.toml +++ b/src/uu/stdbuf/Cargo.toml @@ -1,22 +1,21 @@ [package] -name = "stdbuf" +name = "uu_stdbuf" version = "0.0.1" authors = [] license = "MIT" -build = "build.rs" [lib] -name = "uu_stdbuf" path = "src/stdbuf.rs" [dependencies] getopts = "0.2.18" tempdir = "0.3.7" -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" } [build-dependencies] -libstdbuf = { path="src/libstdbuf" } +libstdbuf = { version="0.0.1", package="uu_stdbuf_libstdbuf", path="src/libstdbuf" } [[bin]] name = "stdbuf" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/stdbuf/build.rs b/src/uu/stdbuf/build.rs index d4c9b718d..a35d1aaad 100644 --- a/src/uu/stdbuf/build.rs +++ b/src/uu/stdbuf/build.rs @@ -2,9 +2,6 @@ use std::env; use std::fs; use std::path::Path; -#[path = "../../common/mkmain.rs"] -mod mkmain; - #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))] mod platform { pub const DYLIB_EXT: &str = ".so"; @@ -21,8 +18,6 @@ mod platform { } fn main() { - mkmain::main(); - let manifest_dir = env::var("CARGO_MANIFEST_DIR").expect("Could not find manifest dir"); let profile = env::var("PROFILE").expect("Could not determine profile"); diff --git a/src/uu/stdbuf/src/libstdbuf/Cargo.toml b/src/uu/stdbuf/src/libstdbuf/Cargo.toml index d977515d9..3b8296555 100644 --- a/src/uu/stdbuf/src/libstdbuf/Cargo.toml +++ b/src/uu/stdbuf/src/libstdbuf/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "libstdbuf" +name = "uu_stdbuf_libstdbuf" version = "0.0.1" authors = [] license = "MIT" @@ -7,13 +7,13 @@ license = "MIT" [lib] name = "libstdbuf" path = "src/libstdbuf.rs" -# XXX: the rlib is just to prevent Cargo from spitting out a warning -crate-type = ["cdylib", "rlib"] +crate-type = ["cdylib", "rlib"] # XXX: note: the rlib is just to prevent Cargo from spitting out a warning [dependencies] cpp = "0.4" libc = "0.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" } [build-dependencies] cpp_build = "0.4" diff --git a/src/uu/stdbuf/src/main.rs b/src/uu/stdbuf/src/main.rs new file mode 100644 index 000000000..c020a7a07 --- /dev/null +++ b/src/uu/stdbuf/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_stdbuf); // spell-checker:ignore procs uucore stdbuf diff --git a/src/uu/stdbuf/src/stdbuf.rs b/src/uu/stdbuf/src/stdbuf.rs index b91f86bb5..2d1bce2cc 100644 --- a/src/uu/stdbuf/src/stdbuf.rs +++ b/src/uu/stdbuf/src/stdbuf.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_stdbuf"] - -/* -* This file is part of the uutils coreutils package. -* -* (c) Dorota Kapturkiewicz -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) Dorota Kapturkiewicz +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate tempdir; diff --git a/src/uu/sum/Cargo.toml b/src/uu/sum/Cargo.toml index 939b5803a..aa401cb76 100644 --- a/src/uu/sum/Cargo.toml +++ b/src/uu/sum/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "sum" +name = "uu_sum" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_sum" path = "src/sum.rs" [dependencies] getopts = "0.2.18" -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]] name = "sum" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/sum/src/main.rs b/src/uu/sum/src/main.rs new file mode 100644 index 000000000..64b0d4254 --- /dev/null +++ b/src/uu/sum/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_sum); // spell-checker:ignore procs uucore diff --git a/src/uu/sum/src/sum.rs b/src/uu/sum/src/sum.rs index 797cbae04..f5870e09c 100644 --- a/src/uu/sum/src/sum.rs +++ b/src/uu/sum/src/sum.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_sum"] - -/* -* This file is part of the uutils coreutils package. -* -* (c) T. Jameson Little -* -* For the full copyright and license information, please view the LICENSE file -* that was distributed with this source code. -*/ +// * This file is part of the uutils coreutils package. +// * +// * (c) T. Jameson Little +// * +// * For the full copyright and license information, please view the LICENSE file +// * that was distributed with this source code. extern crate getopts; diff --git a/src/uu/sync/Cargo.toml b/src/uu/sync/Cargo.toml index 0d24a5fa5..f6c7b2e7d 100644 --- a/src/uu/sync/Cargo.toml +++ b/src/uu/sync/Cargo.toml @@ -1,21 +1,20 @@ [package] -name = "sync" +name = "uu_sync" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_sync" path = "src/sync.rs" [dependencies] getopts = "0.2.18" kernel32-sys = "0.2.2" libc = "0.2.42" -uucore = { version = "0.0.2", features = ["wide"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["wide"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } winapi = { version = "0.3", features = ["handleapi", "winerror"] } [[bin]] name = "sync" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/sync/src/main.rs b/src/uu/sync/src/main.rs new file mode 100644 index 000000000..06d85b278 --- /dev/null +++ b/src/uu/sync/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_sync); // spell-checker:ignore procs uucore diff --git a/src/uu/sync/src/sync.rs b/src/uu/sync/src/sync.rs index 2b976d5db..0954f5be5 100644 --- a/src/uu/sync/src/sync.rs +++ b/src/uu/sync/src/sync.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_sync"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alexander Fomin - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alexander Fomin +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* Last synced with: sync (GNU coreutils) 8.13 */ diff --git a/src/uu/tac/Cargo.toml b/src/uu/tac/Cargo.toml index 11f69b73e..be6f3abd9 100644 --- a/src/uu/tac/Cargo.toml +++ b/src/uu/tac/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "tac" +name = "uu_tac" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_tac" path = "src/tac.rs" [dependencies] getopts = "0.2.18" -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]] name = "tac" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/tac/src/main.rs b/src/uu/tac/src/main.rs new file mode 100644 index 000000000..93d91e2b7 --- /dev/null +++ b/src/uu/tac/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_tac); // spell-checker:ignore procs uucore diff --git a/src/uu/tac/src/tac.rs b/src/uu/tac/src/tac.rs index 61bff94a7..1a9d27494 100644 --- a/src/uu/tac/src/tac.rs +++ b/src/uu/tac/src/tac.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_tac"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/tail/Cargo.toml b/src/uu/tail/Cargo.toml index 0789ed5b5..323704921 100644 --- a/src/uu/tail/Cargo.toml +++ b/src/uu/tail/Cargo.toml @@ -1,24 +1,23 @@ [package] -name = "tail" +name = "uu_tail" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_tail" path = "src/tail.rs" [dependencies] getopts = "0.2.18" kernel32-sys = "0.2.2" libc = "0.2.42" +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" } winapi = "0.3" -uucore = "0.0.2" [target.'cfg(target_os = "redox")'.dependencies] redox_syscall = "0.1" [[bin]] name = "tail" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/tail/README.md b/src/uu/tail/README.md index 6d227c66a..53936a609 100644 --- a/src/uu/tail/README.md +++ b/src/uu/tail/README.md @@ -1,13 +1,18 @@ -Rudimentary tail implementation. +# Notes / ToDO + +- Rudimentary tail implementation. ## Missing features: ### Flags with features -* `--max-unchanged-stats` : with `--follow=name`, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With inotify, this option is rarely useful. -* `--retry` : keep trying to open a file even when it is or becomes inaccessible; useful when follow‐ing by name, i.e., with `--follow=name` + +* [ ] `--max-unchanged-stats` : with `--follow=name`, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With inotify, this option is rarely useful. +* [ ] `--retry` : keep trying to open a file even when it is or becomes inaccessible; useful when follow‐ing by name, i.e., with `--follow=name` ### Others -The current implementation does not handle `-` as an alias for stdin. + +- [ ] The current implementation does not handle `-` as an alias for stdin. ## Possible optimizations: -* Don't read the whole file if not using `-f` and input is regular file. Read in chunks from the end going backwards, reading each individual chunk forward. + +* [ ] Don't read the whole file if not using `-f` and input is regular file. Read in chunks from the end going backwards, reading each individual chunk forward. diff --git a/src/uu/tail/src/main.rs b/src/uu/tail/src/main.rs new file mode 100644 index 000000000..52818fad6 --- /dev/null +++ b/src/uu/tail/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_tail); // spell-checker:ignore procs uucore diff --git a/src/uu/tail/src/tail.rs b/src/uu/tail/src/tail.rs index fa21691ea..4857a4e19 100644 --- a/src/uu/tail/src/tail.rs +++ b/src/uu/tail/src/tail.rs @@ -1,15 +1,11 @@ -#![crate_name = "uu_tail"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Morten Olsen Lysgaard - * (c) Alexander Batischev - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Morten Olsen Lysgaard +// * (c) Alexander Batischev +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. +// * extern crate getopts; extern crate libc; diff --git a/src/uu/tee/Cargo.toml b/src/uu/tee/Cargo.toml index a6c44f756..5a26848b9 100644 --- a/src/uu/tee/Cargo.toml +++ b/src/uu/tee/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "tee" +name = "uu_tee" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_tee" path = "src/tee.rs" [dependencies] getopts = "0.2.18" 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]] name = "tee" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/tee/src/main.rs b/src/uu/tee/src/main.rs new file mode 100644 index 000000000..1314f353e --- /dev/null +++ b/src/uu/tee/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_tee); // spell-checker:ignore procs uucore diff --git a/src/uu/tee/src/tee.rs b/src/uu/tee/src/tee.rs index c2cfc1ac0..32a71c48a 100644 --- a/src/uu/tee/src/tee.rs +++ b/src/uu/tee/src/tee.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_tee"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Aleksander Bielawski - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Aleksander Bielawski +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/test/Cargo.toml b/src/uu/test/Cargo.toml index 4b89d3a6e..a330b870a 100644 --- a/src/uu/test/Cargo.toml +++ b/src/uu/test/Cargo.toml @@ -1,21 +1,20 @@ [package] -name = "test" +name = "uu_test" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_test" path = "src/test.rs" [dependencies] 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" } [target.'cfg(target_os = "redox")'.dependencies] redox_syscall = "0.1" [[bin]] name = "test" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/test/src/main.rs b/src/uu/test/src/main.rs new file mode 100644 index 000000000..5018a5c8c --- /dev/null +++ b/src/uu/test/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_test); // spell-checker:ignore procs uucore diff --git a/src/uu/test/src/test.rs b/src/uu/test/src/test.rs index 0631d292e..7705e9d79 100644 --- a/src/uu/test/src/test.rs +++ b/src/uu/test/src/test.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_test"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) mahkoh (ju.orth [at] gmail [dot] com) - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) mahkoh (ju.orth [at] gmail [dot] com) +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate libc; #[cfg(target_os = "redox")] diff --git a/src/uu/timeout/Cargo.toml b/src/uu/timeout/Cargo.toml index 44a02a13e..7974f92ce 100644 --- a/src/uu/timeout/Cargo.toml +++ b/src/uu/timeout/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "timeout" +name = "uu_timeout" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_timeout" path = "src/timeout.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" time = "0.1.40" -uucore = { version = "0.0.2", features = ["parse_time", "process"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["parse_time", "process", "signals"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "timeout" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/timeout/src/main.rs b/src/uu/timeout/src/main.rs new file mode 100644 index 000000000..20c4271d9 --- /dev/null +++ b/src/uu/timeout/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_timeout); // spell-checker:ignore procs uucore diff --git a/src/uu/timeout/src/timeout.rs b/src/uu/timeout/src/timeout.rs index cd8965955..079f1934c 100644 --- a/src/uu/timeout/src/timeout.rs +++ b/src/uu/timeout/src/timeout.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_timeout"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate libc; diff --git a/src/uu/touch/Cargo.toml b/src/uu/touch/Cargo.toml index dd1f5fd58..3feea497e 100644 --- a/src/uu/touch/Cargo.toml +++ b/src/uu/touch/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "touch" +name = "uu_touch" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_touch" path = "src/touch.rs" [dependencies] filetime = "0.2.1" getopts = "0.2.18" time = "0.1.40" -uucore = { version = "0.0.2", features = ["libc"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["libc"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "touch" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/touch/src/main.rs b/src/uu/touch/src/main.rs new file mode 100644 index 000000000..bad67efd4 --- /dev/null +++ b/src/uu/touch/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_touch); // spell-checker:ignore procs uucore diff --git a/src/uu/touch/src/touch.rs b/src/uu/touch/src/touch.rs index a129f6db8..e3205641f 100644 --- a/src/uu/touch/src/touch.rs +++ b/src/uu/touch/src/touch.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_touch"] - // This file is part of the uutils coreutils package. // // (c) Nick Platt @@ -7,7 +5,6 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// pub extern crate filetime; extern crate getopts; diff --git a/src/uu/tr/Cargo.toml b/src/uu/tr/Cargo.toml index df3fc69da..3f6d20fbc 100644 --- a/src/uu/tr/Cargo.toml +++ b/src/uu/tr/Cargo.toml @@ -1,20 +1,19 @@ [package] -name = "tr" +name = "uu_tr" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_tr" path = "src/tr.rs" [dependencies] bit-set = "0.5.0" fnv = "1.0.5" getopts = "0.2.18" -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]] name = "tr" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/tr/src/expand.rs b/src/uu/tr/src/expand.rs index a10fb43c8..4a5aa533f 100644 --- a/src/uu/tr/src/expand.rs +++ b/src/uu/tr/src/expand.rs @@ -1,13 +1,11 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * (c) kwantam - * 20150428 created `expand` module to eliminate most allocs during setup - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Gehring +// * (c) kwantam +// * * 2015-04-28 ~ created `expand` module to eliminate most allocs during setup +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. use std::char::from_u32; use std::cmp::min; diff --git a/src/uu/tr/src/main.rs b/src/uu/tr/src/main.rs new file mode 100644 index 000000000..8bed990e5 --- /dev/null +++ b/src/uu/tr/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_tr); // spell-checker:ignore procs uucore diff --git a/src/uu/tr/src/tr.rs b/src/uu/tr/src/tr.rs index 069d0fbc4..4fe0e9366 100644 --- a/src/uu/tr/src/tr.rs +++ b/src/uu/tr/src/tr.rs @@ -1,16 +1,12 @@ -#![crate_name = "uu_tr"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Michael Gehring - * (c) kwantam - * 20150428 created `expand` module to eliminate most allocs during setup - * (c) Sergey "Shnatsel" Davidoff - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Michael Gehring +// * (c) kwantam +// * * 2015-04-28 ~ created `expand` module to eliminate most allocs during setup +// * (c) Sergey "Shnatsel" Davidoff +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate bit_set; extern crate fnv; diff --git a/src/uu/true/Cargo.toml b/src/uu/true/Cargo.toml index 37db54256..55ee1616a 100644 --- a/src/uu/true/Cargo.toml +++ b/src/uu/true/Cargo.toml @@ -1,17 +1,16 @@ [package] -name = "true" +name = "uu_true" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_true" path = "src/true.rs" [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]] name = "true" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/true/src/main.rs b/src/uu/true/src/main.rs new file mode 100644 index 000000000..7e009be8a --- /dev/null +++ b/src/uu/true/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_true); // spell-checker:ignore procs uucore diff --git a/src/uu/true/src/true.rs b/src/uu/true/src/true.rs index d1d3d70b9..1589b7113 100644 --- a/src/uu/true/src/true.rs +++ b/src/uu/true/src/true.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_true"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. pub fn uumain(_: Vec) -> i32 { 0 diff --git a/src/uu/truncate/Cargo.toml b/src/uu/truncate/Cargo.toml index 506c96550..c6a2398d4 100644 --- a/src/uu/truncate/Cargo.toml +++ b/src/uu/truncate/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "truncate" +name = "uu_truncate" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_truncate" path = "src/truncate.rs" [dependencies] getopts = "0.2.18" -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]] name = "truncate" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/truncate/src/main.rs b/src/uu/truncate/src/main.rs new file mode 100644 index 000000000..91fe70b6d --- /dev/null +++ b/src/uu/truncate/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_truncate); // spell-checker:ignore procs uucore diff --git a/src/uu/truncate/src/truncate.rs b/src/uu/truncate/src/truncate.rs index 0358b4382..56def1cae 100644 --- a/src/uu/truncate/src/truncate.rs +++ b/src/uu/truncate/src/truncate.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_truncate"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Alex Lyon +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/tsort/Cargo.toml b/src/uu/tsort/Cargo.toml index 82f710b1d..91f9b354c 100644 --- a/src/uu/tsort/Cargo.toml +++ b/src/uu/tsort/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "tsort" +name = "uu_tsort" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_tsort" path = "src/tsort.rs" [dependencies] getopts = "0.2.18" -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]] name = "tsort" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/tsort/src/main.rs b/src/uu/tsort/src/main.rs new file mode 100644 index 000000000..6b108cc5e --- /dev/null +++ b/src/uu/tsort/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_tsort); // spell-checker:ignore procs uucore tsort diff --git a/src/uu/tsort/src/tsort.rs b/src/uu/tsort/src/tsort.rs index 9a01b0cc3..0b8a05206 100644 --- a/src/uu/tsort/src/tsort.rs +++ b/src/uu/tsort/src/tsort.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_tsort"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Ben Eggers - * (c) Akira Hayakawa - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Ben Eggers +// * (c) Akira Hayakawa +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/tty/Cargo.toml b/src/uu/tty/Cargo.toml index 7d2769a95..cf91cf031 100644 --- a/src/uu/tty/Cargo.toml +++ b/src/uu/tty/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "tty" +name = "uu_tty" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_tty" path = "src/tty.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -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" } [[bin]] name = "tty" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/tty/src/main.rs b/src/uu/tty/src/main.rs new file mode 100644 index 000000000..8cb1cbb4b --- /dev/null +++ b/src/uu/tty/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_tty); // spell-checker:ignore procs uucore diff --git a/src/uu/tty/src/tty.rs b/src/uu/tty/src/tty.rs index 033f4fbcc..a024756f9 100644 --- a/src/uu/tty/src/tty.rs +++ b/src/uu/tty/src/tty.rs @@ -1,15 +1,11 @@ -#![crate_name = "uu_tty"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Synced with http://lingrok.org/xref/coreutils/src/tty.c - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. +// * +// * Synced with http://lingrok.org/xref/coreutils/src/tty.c extern crate getopts; extern crate libc; diff --git a/src/uu/uname/Cargo.toml b/src/uu/uname/Cargo.toml index e05270e20..74a54557f 100644 --- a/src/uu/uname/Cargo.toml +++ b/src/uu/uname/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "uname" +name = "uu_uname" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_uname" path = "src/uname.rs" [dependencies] clap = "2.32" 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]] name = "uname" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/uname/src/main.rs b/src/uu/uname/src/main.rs new file mode 100644 index 000000000..f40104670 --- /dev/null +++ b/src/uu/uname/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_uname); // spell-checker:ignore procs uucore uname diff --git a/src/uu/uname/src/uname.rs b/src/uu/uname/src/uname.rs index 007d54d49..92d88a376 100644 --- a/src/uu/uname/src/uname.rs +++ b/src/uu/uname/src/uname.rs @@ -1,5 +1,3 @@ -#![crate_name = "uu_uname"] - // This file is part of the uutils coreutils package. // // (c) Joao Oliveira @@ -7,7 +5,6 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// // last synced with: uname (GNU coreutils) 8.21 diff --git a/src/uu/unexpand/Cargo.toml b/src/uu/unexpand/Cargo.toml index d81f290e4..9241aba02 100644 --- a/src/uu/unexpand/Cargo.toml +++ b/src/uu/unexpand/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "unexpand" +name = "uu_unexpand" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_unexpand" path = "src/unexpand.rs" [dependencies] getopts = "0.2.18" 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]] name = "unexpand" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/unexpand/src/main.rs b/src/uu/unexpand/src/main.rs new file mode 100644 index 000000000..82d11dd95 --- /dev/null +++ b/src/uu/unexpand/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_unexpand); // spell-checker:ignore procs uucore unexpand diff --git a/src/uu/unexpand/src/unexpand.rs b/src/uu/unexpand/src/unexpand.rs index 64a211352..8c731a995 100644 --- a/src/uu/unexpand/src/unexpand.rs +++ b/src/uu/unexpand/src/unexpand.rs @@ -1,15 +1,11 @@ -#![crate_name = "uu_unexpand"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Virgile Andreani - * (c) kwantam - * 20150428 updated to work with both UTF-8 and non-UTF-8 encodings - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Virgile Andreani +// * (c) kwantam +// * * 2015-04-28 ~ updated to work with both UTF-8 and non-UTF-8 encodings +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; extern crate unicode_width; diff --git a/src/uu/uniq/Cargo.toml b/src/uu/uniq/Cargo.toml index 5263efca4..28b24bb67 100644 --- a/src/uu/uniq/Cargo.toml +++ b/src/uu/uniq/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "uniq" +name = "uu_uniq" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_uniq" path = "src/uniq.rs" [dependencies] getopts = "0.2.18" -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]] name = "uniq" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/uniq/src/main.rs b/src/uu/uniq/src/main.rs new file mode 100644 index 000000000..dd4b6da1a --- /dev/null +++ b/src/uu/uniq/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_uniq); // spell-checker:ignore procs uucore diff --git a/src/uu/uniq/src/uniq.rs b/src/uu/uniq/src/uniq.rs index 0b64bc084..79b8857cf 100644 --- a/src/uu/uniq/src/uniq.rs +++ b/src/uu/uniq/src/uniq.rs @@ -1,14 +1,9 @@ -#![crate_name = "uu_uniq"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Chirag B Jadwani - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Chirag B Jadwani +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/unlink/Cargo.toml b/src/uu/unlink/Cargo.toml index 9cd1ee7d2..f0c19d04a 100644 --- a/src/uu/unlink/Cargo.toml +++ b/src/uu/unlink/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "unlink" +name = "uu_unlink" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_unlink" path = "src/unlink.rs" [dependencies] getopts = "0.2.18" 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]] name = "unlink" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/unlink/src/main.rs b/src/uu/unlink/src/main.rs new file mode 100644 index 000000000..f01b6bac3 --- /dev/null +++ b/src/uu/unlink/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_unlink); // spell-checker:ignore procs uucore diff --git a/src/uu/unlink/src/unlink.rs b/src/uu/unlink/src/unlink.rs index 3c8bc71da..a8e20bacb 100644 --- a/src/uu/unlink/src/unlink.rs +++ b/src/uu/unlink/src/unlink.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_unlink"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Colin Warren - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Colin Warren +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: unlink (GNU coreutils) 8.21 */ diff --git a/src/uu/uptime/Cargo.toml b/src/uu/uptime/Cargo.toml index 0cb110878..cafec2bfd 100644 --- a/src/uu/uptime/Cargo.toml +++ b/src/uu/uptime/Cargo.toml @@ -1,12 +1,10 @@ [package] -name = "uptime" +name = "uu_uptime" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_uptime" path = "src/uptime.rs" [dependencies] @@ -14,8 +12,9 @@ getopts = "0.2.18" time = "0.1.40" chrono = "0.4" clap = "2.32" -uucore = { version = "0.0.2", features = ["utmpx"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "uptime" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/uptime/src/main.rs b/src/uu/uptime/src/main.rs new file mode 100644 index 000000000..352703eb3 --- /dev/null +++ b/src/uu/uptime/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_uptime); // spell-checker:ignore procs uucore diff --git a/src/uu/uptime/src/uptime.rs b/src/uu/uptime/src/uptime.rs index 53133dc79..e2906a9d6 100644 --- a/src/uu/uptime/src/uptime.rs +++ b/src/uu/uptime/src/uptime.rs @@ -1,14 +1,10 @@ -#![crate_name = "uu_uptime"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * (c) Jian Zeng - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * (c) Jian Zeng +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: cat (GNU coreutils) 8.13 */ diff --git a/src/uu/users/Cargo.toml b/src/uu/users/Cargo.toml index 5176646cf..b0b985189 100644 --- a/src/uu/users/Cargo.toml +++ b/src/uu/users/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "users" +name = "uu_users" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_users" path = "src/users.rs" [dependencies] getopts = "0.2.18" -uucore = { version = "0.0.2", features = ["utmpx"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[bin]] name = "users" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/users/src/main.rs b/src/uu/users/src/main.rs new file mode 100644 index 000000000..f065c633c --- /dev/null +++ b/src/uu/users/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_users); // spell-checker:ignore procs uucore diff --git a/src/uu/users/src/users.rs b/src/uu/users/src/users.rs index 3d4311c4d..72284dee7 100644 --- a/src/uu/users/src/users.rs +++ b/src/uu/users/src/users.rs @@ -1,13 +1,10 @@ -#![crate_name = "uu_users"] -/* - * This file is part of the uutils coreutils package. - * - * (c) KokaKiwi - * (c) Jian Zeng - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) KokaKiwi +// * (c) Jian Zeng +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: whoami (GNU coreutils) 8.22 */ // Allow dead code here in order to keep all fields, constants here, for consistency. diff --git a/src/uu/wc/Cargo.toml b/src/uu/wc/Cargo.toml index cad2a4286..15d5ac090 100644 --- a/src/uu/wc/Cargo.toml +++ b/src/uu/wc/Cargo.toml @@ -1,18 +1,17 @@ [package] -name = "wc" +name = "uu_wc" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_wc" path = "src/wc.rs" [dependencies] getopts = "0.2.18" -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]] name = "wc" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/wc/src/main.rs b/src/uu/wc/src/main.rs new file mode 100644 index 000000000..ce5629e51 --- /dev/null +++ b/src/uu/wc/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_wc); // spell-checker:ignore procs uucore diff --git a/src/uu/wc/src/wc.rs b/src/uu/wc/src/wc.rs index ed1d222ab..a088469e9 100644 --- a/src/uu/wc/src/wc.rs +++ b/src/uu/wc/src/wc.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_wc"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Boden Garman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Boden Garman +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. extern crate getopts; diff --git a/src/uu/who/Cargo.toml b/src/uu/who/Cargo.toml index ce8f3c509..2f5f9ef4c 100644 --- a/src/uu/who/Cargo.toml +++ b/src/uu/who/Cargo.toml @@ -1,19 +1,18 @@ [package] -name = "who" +name = "uu_who" version = "0.0.1" authors = [] license = "MIT" -build = "../../common/mkmain.rs" [lib] -name = "uu_who" path = "src/who.rs" [dependencies] -uucore = { version = "0.0.2", features = ["utmpx"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } ## optional clippy = { version = "0.0.212", optional = true } [[bin]] name = "who" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/who/src/main.rs b/src/uu/who/src/main.rs new file mode 100644 index 000000000..bc0015a80 --- /dev/null +++ b/src/uu/who/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_who); // spell-checker:ignore procs uucore diff --git a/src/uu/who/src/who.rs b/src/uu/who/src/who.rs index a83457f18..e0bd68101 100644 --- a/src/uu/who/src/who.rs +++ b/src/uu/who/src/who.rs @@ -4,8 +4,7 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// -#![crate_name = "uu_who"] + #![cfg_attr(feature = "clippy", feature(plugin))] #![cfg_attr(feature = "clippy", plugin(clippy))] diff --git a/src/uu/whoami/Cargo.toml b/src/uu/whoami/Cargo.toml index f1d315fce..3459a83ee 100644 --- a/src/uu/whoami/Cargo.toml +++ b/src/uu/whoami/Cargo.toml @@ -1,21 +1,20 @@ [package] -name = "whoami" +name = "uu_whoami" version = "0.0.1" authors = [] license = "MIT" -description = "Print effective user ID." -build = "../../common/mkmain.rs" +description = "Diplay effective user ID" [lib] -name = "uu_whoami" path = "src/whoami.rs" [dependencies] advapi32-sys = "0.2.0" clap = "2.32" -uucore = { version = "0.0.2", features = ["entries", "wide"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "wide"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } winapi = { version = "0.3", features = ["lmcons"] } [[bin]] name = "whoami" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/whoami/src/main.rs b/src/uu/whoami/src/main.rs new file mode 100644 index 000000000..0439923ee --- /dev/null +++ b/src/uu/whoami/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_whoami); // spell-checker:ignore procs uucore whoami diff --git a/src/uu/whoami/src/whoami.rs b/src/uu/whoami/src/whoami.rs index 45e2845da..4f995afaa 100644 --- a/src/uu/whoami/src/whoami.rs +++ b/src/uu/whoami/src/whoami.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_whoami"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: whoami (GNU coreutils) 8.21 */ diff --git a/src/uu/yes/Cargo.toml b/src/uu/yes/Cargo.toml index aa5e8967b..4719419a0 100644 --- a/src/uu/yes/Cargo.toml +++ b/src/uu/yes/Cargo.toml @@ -1,23 +1,23 @@ [package] -name = "yes" +name = "uu_yes" version = "0.0.1" authors = [] license = "MIT" -description = "Repeatedly output a line with all specified STRING(s), or 'y'." -build = "../../common/mkmain.rs" +description = "Repeatedly output a line with all specified STRING(s), or 'y'" [lib] -name = "uu_yes" path = "src/yes.rs" [dependencies] clap = "2.32" -uucore = { version = "0.0.2", features = ["zero-copy"] } +uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["zero-copy"] } +uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [features] -latency = [] default = [] +# +latency = [] [[bin]] name = "yes" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/yes/src/main.rs b/src/uu/yes/src/main.rs new file mode 100644 index 000000000..597eb5b57 --- /dev/null +++ b/src/uu/yes/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_yes); // spell-checker:ignore procs uucore diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index a19edc6f6..0a5d56ec1 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -1,13 +1,9 @@ -#![crate_name = "uu_yes"] - -/* - * This file is part of the uutils coreutils package. - * - * (c) Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +// * This file is part of the uutils coreutils package. +// * +// * (c) Jordi Boggiano +// * +// * For the full copyright and license information, please view the LICENSE +// * file that was distributed with this source code. /* last synced with: yes (GNU coreutils) 8.13 */ diff --git a/tests/test_chown.rs b/tests/test_chown.rs index 41d6a235a..b034279bf 100644 --- a/tests/test_chown.rs +++ b/tests/test_chown.rs @@ -1,11 +1,11 @@ use common::util::*; -extern crate uu_chown; -pub use self::uu_chown::*; +extern crate chown; +// pub use self::uu_chown::*; #[cfg(test)] mod test_passgrp { - use super::uu_chown::entries::{gid2grp, grp2gid, uid2usr, usr2uid}; + use super::chown::entries::{gid2grp, grp2gid, uid2usr, usr2uid}; #[test] fn test_usr2uid() { diff --git a/tests/test_dircolors.rs b/tests/test_dircolors.rs index 5c1df35d8..e35ee16de 100644 --- a/tests/test_dircolors.rs +++ b/tests/test_dircolors.rs @@ -1,8 +1,8 @@ -extern crate uu_dircolors; -use self::uu_dircolors::{guess_syntax, OutputFmt, StrUtils}; - use common::util::*; +extern crate dircolors; +use self::dircolors::{guess_syntax, OutputFmt, StrUtils}; + #[test] fn test_shell_syntax() { use std::env; diff --git a/tests/test_pinky.rs b/tests/test_pinky.rs index 6ad25ebbc..1156d7857 100644 --- a/tests/test_pinky.rs +++ b/tests/test_pinky.rs @@ -4,8 +4,8 @@ use common::util::*; use self::uucore::entries::{Locate, Passwd}; -extern crate uu_pinky; -pub use self::uu_pinky::*; +extern crate pinky; +pub use self::pinky::*; #[test] fn test_capitalize() { diff --git a/tests/test_stat.rs b/tests/test_stat.rs index e89f91451..51a677154 100644 --- a/tests/test_stat.rs +++ b/tests/test_stat.rs @@ -2,8 +2,8 @@ extern crate regex; use common::util::*; -extern crate uu_stat; -pub use self::uu_stat::*; +extern crate stat; +pub use self::stat::*; #[cfg(test)] mod test_fsext { diff --git a/tests/test_tail.rs b/tests/test_tail.rs index ecf40a655..6b218e58b 100644 --- a/tests/test_tail.rs +++ b/tests/test_tail.rs @@ -1,6 +1,6 @@ -extern crate uu_tail; +extern crate tail; -use self::uu_tail::parse_size; +use self::tail::parse_size; use common::util::*; use std::char::from_digit; use std::io::Write; diff --git a/tests/test_touch.rs b/tests/test_touch.rs index 65190bc39..a7110ab37 100644 --- a/tests/test_touch.rs +++ b/tests/test_touch.rs @@ -1,5 +1,5 @@ -extern crate uu_touch; -use self::uu_touch::filetime::{self, FileTime}; +extern crate touch; +use self::touch::filetime::{self, FileTime}; extern crate time;