diff --git a/.appveyor.yml b/.appveyor.yml index b800cb944..a8ecc0c6d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,5 @@ # spell-checker:words POSIX SDK SDKs repo toolchain toolchains -# spell-checker:ignore ABI ARCH BACKTRACE BINDIR COMNTOOLS MINGW MINGWDIR MSVC MSYS USERPROFILE cl dllcrt findstr maint mkdir rustc rustlib rustup targetting uutils vcvarsall +# spell-checker:ignore ABI ARCH BACKTRACE BINDIR COMNTOOLS MINGW MINGWDIR MSVC MSYS USERPROFILE cl dllcrt findstr maint mkdir rustc rustlib rustup uutils vcvarsall version: "{build} ~ {branch}" diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 11a90bed3..aacd4d51c 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -4,13 +4,12 @@ name: CICD # spell-checker:ignore (env/flags) Ccodegen Coverflow RUSTFLAGS # spell-checker:ignore (jargon) SHAs deps softprops toolchain # spell-checker:ignore (names) CodeCOV MacOS MinGW Peltoche rivy -# spell-checker:ignore (shell/tools) choco clippy dmake esac fakeroot gmake grcov halium lcov libssl mkdir popd printf pushd rustc rustfmt rustup shopt xargs -# spell-checker:ignore (misc) alnum gnueabihf issuecomment maint nullglob onexitbegin onexitend uutils - +# spell-checker:ignore (shell/tools) choco clippy dmake dpkg esac fakeroot gmake grcov halium lcov libssl mkdir popd printf pushd rustc rustfmt rustup shopt xargs +# spell-checker:ignore (misc) aarch alnum armhf coreutils gnueabihf issuecomment maint nullglob onexitbegin onexitend uutils env: - PROJECT_NAME: uutils - PROJECT_DESC: "'Universal' (cross-platform) CLI utilities" + PROJECT_NAME: coreutils + PROJECT_DESC: "Core universal (cross-platform) utilities" PROJECT_AUTH: "uutils" RUST_MIN_SRV: "1.31.0" ## v1.31.0 == "Rust 2018" (2018-12-06) RUST_COV_SRV: "2020-04-29" ## (~v1.45.0) supported rust version for code coverage; (date required/used by 'coverage') ## !maint: refactor when code coverage support is included in the stable channel @@ -35,11 +34,6 @@ jobs: shell: bash run: | ## VARs setup - # #maint: [rivy; 2020-02-08] 'windows-latest' `cargo fmt` is bugged for this project (see reasons @ GH:rust-lang/rustfmt #3324, #3590, #3688 ; waiting for repair) - JOB_DO_FORMAT_TESTING="true" - case '${{ matrix.job.os }}' in windows-latest) unset JOB_DO_FORMAT_TESTING ;; esac; - echo set-output name=JOB_DO_FORMAT_TESTING::${JOB_DO_FORMAT_TESTING:-/false} - echo ::set-output name=JOB_DO_FORMAT_TESTING::${JOB_DO_FORMAT_TESTING} # target-specific options # * CARGO_FEATURES_OPTION CARGO_FEATURES_OPTION='' ; @@ -54,14 +48,12 @@ jobs: profile: minimal # minimal component installation (ie, no documentation) components: rustfmt, clippy - name: "`fmt` testing" - if: steps.vars.outputs.JOB_DO_FORMAT_TESTING shell: bash run: | # `fmt` testing # * convert any warnings to GHA UI annotations; ref: S=$(cargo fmt -- --check) && printf "%s\n" "$S" || { printf "%s\n" "$S" | sed -E -n -e "s/^Diff[[:space:]]+in[[:space:]]+${PWD//\//\\/}\/(.*)[[:space:]]+at[[:space:]]+[^0-9]+([0-9]+).*$/::warning file=\1,line=\2::WARNING: \`cargo fmt\`: style violation/p" ; } - name: "`fmt` testing of tests" - if: steps.vars.outputs.JOB_DO_FORMAT_TESTING shell: bash run: | # `fmt` testing of tests @@ -130,7 +122,10 @@ jobs: job: # { os, target, cargo-options, features, use-cross, toolchain } - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf , features: feat_os_unix_gnueabihf , use-cross: use-cross } + - { os: ubuntu-latest , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf , use-cross: use-cross } - { os: ubuntu-16.04 , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } + # - { os: ubuntu-18.04 , target: i586-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } ## note: older windows platform; not required, dev-FYI only + # - { os: ubuntu-18.04 , target: i586-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } ## note: older windows platform; not required, dev-FYI only - { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } - { os: ubuntu-18.04 , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross } - { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } @@ -148,6 +143,7 @@ jobs: ## install/setup prerequisites case '${{ matrix.job.target }}' in arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; + aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; esac - name: Initialize workflow variables id: vars @@ -186,7 +182,14 @@ jobs: echo ::set-output name=REF_TAG::${REF_TAG} echo ::set-output name=REF_SHAS::${REF_SHAS} # parse target - unset TARGET_ARCH ; case '${{ matrix.job.target }}' in arm-unknown-linux-gnueabihf) TARGET_ARCH=arm ;; i686-*) TARGET_ARCH=i686 ;; x86_64-*) TARGET_ARCH=x86_64 ;; esac; + unset TARGET_ARCH + case '${{ matrix.job.target }}' in + aarch64-*) TARGET_ARCH=arm64 ;; + arm-*-*hf) TARGET_ARCH=armhf ;; + i586-*) TARGET_ARCH=i586 ;; + i686-*) TARGET_ARCH=i686 ;; + x86_64-*) TARGET_ARCH=x86_64 ;; + esac; echo set-output name=TARGET_ARCH::${TARGET_ARCH} echo ::set-output name=TARGET_ARCH::${TARGET_ARCH} unset TARGET_OS ; case '${{ matrix.job.target }}' in *-linux-*) TARGET_OS=linux ;; *-apple-*) TARGET_OS=macos ;; *-windows-*) TARGET_OS=windows ;; esac; @@ -203,9 +206,34 @@ jobs: echo ::set-output name=PKG_BASENAME::${PKG_BASENAME} echo ::set-output name=PKG_NAME::${PKG_NAME} # deployable tag? (ie, leading "vM" or "M"; M == version number) - unset DEPLOYABLE ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DEPLOYABLE='true' ; fi - echo set-output name=DEPLOYABLE::${DEPLOYABLE:-/false} - echo ::set-output name=DEPLOYABLE::${DEPLOYABLE} + unset DEPLOY ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DEPLOY='true' ; fi + echo set-output name=DEPLOY::${DEPLOY:-/false} + echo ::set-output name=DEPLOY::${DEPLOY} + # DPKG architecture? + unset DPKG_ARCH + case ${{ matrix.job.target }} in + x86_64-*-linux-*) DPKG_ARCH=amd64 ;; + *-linux-*) DPKG_ARCH=${TARGET_ARCH} ;; + esac + echo set-output name=DPKG_ARCH::${DPKG_ARCH} + echo ::set-output name=DPKG_ARCH::${DPKG_ARCH} + # DPKG version? + unset DPKG_VERSION ; if [[ $REF_TAG =~ ^[vV]?[0-9].* ]]; then DPKG_VERSION=${REF_TAG/#[vV]/} ; fi + echo set-output name=DPKG_VERSION::${DPKG_VERSION} + echo ::set-output name=DPKG_VERSION::${DPKG_VERSION} + # DPKG base name/conflicts? + DPKG_BASENAME=${PROJECT_NAME} + DPKG_CONFLICTS=${PROJECT_NAME}-musl + case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${PROJECT_NAME}-musl ; DPKG_CONFLICTS=${PROJECT_NAME} ;; esac; + echo set-output name=DPKG_BASENAME::${DPKG_BASENAME} + echo set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS} + echo ::set-output name=DPKG_BASENAME::${DPKG_BASENAME} + echo ::set-output name=DPKG_CONFLICTS::${DPKG_CONFLICTS} + # DPKG name + unset DPKG_NAME; + if [[ -n $DPKG_ARCH && -n $DPKG_VERSION ]]; then DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" ; fi + echo set-output name=DPKG_NAME::${DPKG_NAME} + echo ::set-output name=DPKG_NAME::${DPKG_NAME} # target-specific options # * CARGO_FEATURES_OPTION CARGO_FEATURES_OPTION='' ; @@ -216,18 +244,17 @@ jobs: CARGO_USE_CROSS='true' ; case '${{ matrix.job.use-cross }}' in ''|0|f|false|n|no) unset CARGO_USE_CROSS ;; esac; echo set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS:-/false} echo ::set-output name=CARGO_USE_CROSS::${CARGO_USE_CROSS} - # # * `arm` cannot be tested on ubuntu-* hosts (b/c testing is currently primarily done via comparison of target outputs with built-in outputs and the `arm` target is not executable on the host) - JOB_DO_TESTING="true" - case '${{ matrix.job.target }}' in arm-*) unset JOB_DO_TESTING ;; esac; - echo set-output name=JOB_DO_TESTING::${JOB_DO_TESTING:-/false} - echo ::set-output name=JOB_DO_TESTING::${JOB_DO_TESTING} - # # * test only binary for arm-type targets - unset CARGO_TEST_OPTIONS - unset CARGO_TEST_OPTIONS ; case '${{ matrix.job.target }}' in arm-*) CARGO_TEST_OPTIONS="--bin ${PROJECT_NAME}" ;; esac; + # * test only library and/or binaries for arm-type targets + unset CARGO_TEST_OPTIONS ; case '${{ matrix.job.target }}' in aarch64-* | arm-*) CARGO_TEST_OPTIONS="--bins" ;; esac; echo set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS} echo ::set-output name=CARGO_TEST_OPTIONS::${CARGO_TEST_OPTIONS} - # * strip executable? - STRIP="strip" ; case '${{ matrix.job.target }}' in arm-unknown-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;; *-pc-windows-msvc) STRIP="" ;; esac; + # * executable for `strip`? + STRIP="strip" + case ${{ matrix.job.target }} in + aarch64-*-linux-gnu) STRIP="aarch64-linux-gnu-strip" ;; + arm-*-linux-gnueabihf) STRIP="arm-linux-gnueabihf-strip" ;; + *-pc-windows-msvc) STRIP="" ;; + esac; echo set-output name=STRIP::${STRIP:-/false} echo ::set-output name=STRIP::${STRIP} - name: Create all needed build/work directories @@ -236,6 +263,7 @@ jobs: ## create build/work space mkdir -p '${{ steps.vars.outputs.STAGING }}' mkdir -p '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}' + mkdir -p '${{ steps.vars.outputs.STAGING }}/dpkg' - name: rust toolchain ~ install uses: actions-rs/toolchain@v1 with: @@ -307,12 +335,28 @@ jobs: *) tar czf '${{ steps.vars.outputs.PKG_NAME }}' '${{ steps.vars.outputs.PKG_BASENAME }}'/* ;; esac popd >/dev/null + # dpkg + if [ -n "${{ steps.vars.outputs.DPKG_NAME }}" ]; then + DPKG_DIR="${{ steps.vars.outputs.STAGING }}/dpkg" + # binary + install -Dm755 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' "${DPKG_DIR}/usr/bin/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}" + if [ -n "${{ steps.vars.outputs.STRIP }}" ]; then "${{ steps.vars.outputs.STRIP }}" "${DPKG_DIR}/usr/bin/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}" ; fi + # README and LICENSE + (shopt -s nullglob; for f in [R]"EADME"{,.*}; do install -Dm644 "$f" "${DPKG_DIR}/usr/share/doc/${{ env.PROJECT_NAME }}/$f" ; done) + (shopt -s nullglob; for f in [L]"ICENSE"{-*,}{,.*}; do install -Dm644 "$f" "${DPKG_DIR}/usr/share/doc/${{ env.PROJECT_NAME }}/$f" ; done) + # control file + mkdir -p "${DPKG_DIR}/DEBIAN" + printf "Package: ${{ steps.vars.outputs.DPKG_BASENAME }}\nVersion: ${{ steps.vars.outputs.DPKG_VERSION }}\nSection: utils\nPriority: optional\nMaintainer: ${{ env.PROJECT_AUTH }}\nArchitecture: ${{ steps.vars.outputs.DPKG_ARCH }}\nProvides: ${{ env.PROJECT_NAME }}\nConflicts: ${{ steps.vars.outputs.DPKG_CONFLICTS }}\nDescription: ${{ env.PROJECT_DESC }}\n" > "${DPKG_DIR}/DEBIAN/control" + # build dpkg + fakeroot dpkg-deb --build "${DPKG_DIR}" "${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }}" + fi - name: Publish uses: softprops/action-gh-release@v1 - if: steps.vars.outputs.DEPLOYABLE + if: steps.vars.outputs.DEPLOY with: files: | ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_NAME }} + ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.DPKG_NAME }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vscode/cSpell.json b/.vscode/cSpell.json new file mode 100644 index 000000000..633e97165 --- /dev/null +++ b/.vscode/cSpell.json @@ -0,0 +1,296 @@ +// `cspell` settings +{ + "version": "0.1", // Version of the setting file. Always 0.1 + "language": "en", // language - current active spelling language + // ignoreWords + "ignoreWords": [ + // abbrev/acronyms + "Cygwin", + "FreeBSD", + "Gmail", + "Irix", + "MacOS", + "MinGW", + "Minix", + "MS-DOS", + "MSDOS", + "NetBSD", + "Novell", + "OpenBSD", + "POSIX", + "SELinux", + "Solaris", + "Xenix", + "flac", + "lzma", + // crates + "byteorder", + "chrono", + "filetime", + "formatteriteminfo", + "getopts", + "itertools", + "multifilereader", + "onig", + "peekreader", + "termion", + "termios", + "termsize", + "termwidth", + "textwrap", + "walkdir", + "winapi", + "xattr", + // jargon + "AST", // abstract syntax tree + "CPU", + "CPUs", + "FIFO", + "FIFOs", + "FQDN", // fully qualified domain name + "GID", // group ID + "GIDs", + "POSIXLY", + "RNG", // random number generator + "RNGs", + "UID", // user ID + "UIDs", + "UUID", // universally unique identifier + "arity", + "bitmask", + "canonicalization", + "canonicalize", + "colorizable", + "colorize", + "consts", + "dedup", + "deque", + "dequeue", + "enqueue", + "executable", + "executables", + "gibibytes", + "hardlink", + "hardlinks", + "hashsums", + "kibibytes", + "mebibytes", + "mergeable", + "multibyte", + "nonportable", + "peekable", + "precompiled", + "precompute", + "preload", + "prepend", + "prepended", + "primality", + "pseudoprime", + "pseudoprimes", + "readonly", + "seedable", + "semver", + "symlink", + "symlinks", + "syscall", + "toekenize", + "unbuffered", + "unportable", + "whitespace", + // names + "Akira Hayakawa", "Akira", "Hayakawa", + "Alan Andrade", "Alan", "Andrade", + "Alex Lyon", "Alex", "Lyon", + "Alexander Batischev", "Alexander", "Batischev", + "Aleksander Bielawski", "Aleksander", "Bielawski", + "Alexander Fomin", "Alexander", "Fomin", + "Anthony Deschamps", "Anthony", "Deschamps", + "Ben Eills", "Ben", "Eills", + "Ben Hirsch", "Ben", "Hirsch", + "Benoit Benedetti", "Benoit", "Benedetti", + "Boden Garman", "Boden", "Garman", + "Chirag B Jadwani", "Chirag", "Jadwani", + "Derek Chiang", "Derek", "Chiang", + "Dorota Kapturkiewicz", "Dorota", "Kapturkiewicz", + "Evgeniy Klyuchikov", "Evgeniy", "Klyuchikov", + "Fangxu Hu", "Fangxu", "Hu", + "Gil Cottle", "Gil", "Cottle", + "Haitao Li", "Haitao", "Li", + "Inokentiy Babushkin", "Inokentiy", "Babushkin", + "Joao Oliveira", "Joao", "Oliveira", + "Jeremiah Peschka", "Jeremiah", "Peschka", + "Jian Zeng", "Jian", "Zeng", + "Jimmy Lu", "Jimmy", "Lu", + "Jordi Boggiano", "Jordi", "Boggiano", + "Jordy Dickinson", "Jordy", "Dickinson", + "Joseph Crail", "Joseph", "Crail", + "Joshua S Miller", "Joshua", "Miller", + "KokaKiwi", + "Konstantin Pospelov", "Konstantin", "Pospelov", + "Mahkoh", + "Maciej Dziardziel", "Maciej", "Dziardziel", + "Michael Gehring", "Michael", "Gehring", + "Martin Kysel", "Martin", "Kysel", + "Morten Olsen Lysgaard", "Morten", "Olsen", "Lysgaard", + "Nicholas Juszczak", "Nicholas", "Juszczak", + "Nick Platt", "Nick", "Platt", + "Orvar Segerström", "Orvar", "Segerström", + "Peter Atashian", "Peter", "Atashian", + "Rolf Morel", "Rolf", "Morel", + "Roman Gafiyatullin", "Roman", "Gafiyatullin", + "Roy Ivy III", "Roy", "Ivy", "III", + "Sergey 'Shnatsel' Davidoff", "Sergey", "Shnatsel", "Davidoff", + "Sokovikov Evgeniy", "Sokovikov", "Evgeniy", + "Sunrin SHIMURA", "Sunrin", "SHIMURA", + "Smigle00", "Smigle", + "Sylvestre Ledru", "Sylvestre", "Ledru", + "Tobias Bohumir Schottdorf", "Tobias", "Bohumir", "Schottdorf", + "Virgile Andreani", "Virgile", "Andreani", + "Vsevolod Velichko", "Vsevolod", "Velichko", + "Wiktor Kuropatwa", "Wiktor", "Kuropatwa", + "Yury Krivopalov", "Yury", "Krivopalov", + "anonymousknight", + "kwantam", + // rust + "clippy", + "concat", + "powi", + "repr", + "rfind", + "rustc", + "rustfmt", + "substr", + "splitn", + // shell + "passwd", + "tcsh", + // tags + "Maint", + // uutils + "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", + // vars/libc + "FILENO", + "HOSTSIZE", + "IDSIZE", + "IRGRP", + "IROTH", + "IRUSR", + "ISGID", + "ISUID", + "ISVTX", + "IWGRP", + "IWOTH", + "IWUSR", + "IXGRP", + "IXOTH", + "IXUSR", + "LINESIZE", + "NAMESIZE", + "USERSIZE", + "addrinfo", + "addrlen", + "canonname", + "chroot", + "freeaddrinfo", + "getaddrinfo", + "getegid", + "geteuid", + "getgid", + "getgrgid", + "getgrnam", + "getgrouplist", + "getgroups", + "getpwnam", + "getpwuid", + "getuid", + "inode", + "isatty", + "lchown", + "setgid", + "setgroups", + "setuid", + "socktype", + "umask", + "waitpid", + // vars/signals + "SIGPIPE", + // vars/sync + "Condvar", + // vars/time + "Timespec", + "nsec", + "nsecs", + "strftime", + "usec", + "usecs", + // vars/utmpx + "endutxent", + "getutxent", + "getutxid", + "getutxline", + "pututxline", + "setutxent", + "utmp", + "utmpx", + "utmpxname", + // vars/winapi + "errhandlingapi", + "fileapi", + "handleapi", + "minwindef", + "processthreadsapi", + "synchapi", + "winbase", + "winerror", + "winnt", + "winsock", + "DWORD", + "LPWSTR", + "WCHAR", + // uucore + "optflag", + "optflagmulti", + "optflagopt", + "optmulti", + "optopt", + // uutils + "coreopts", + "coreutils", + "libc", + "musl", + "utmpx", + "uucore", + "uumain", + "uutils" + ], + // words - list of words to be always considered correct + "words": [] +} diff --git a/Cargo.lock b/Cargo.lock index b7b5fe2d1..c9587a470 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,15 +14,15 @@ name = "aho-corasick" version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "aho-corasick" -version = "0.7.3" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -30,29 +30,27 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "arch" -version = "0.0.1" -dependencies = [ - "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "atty" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" -version = "0.1.2" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "autocfg" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -60,55 +58,33 @@ name = "backtrace" version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.28" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base32" -version = "0.0.1" -dependencies = [ - "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "base64" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "basename" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bit-set" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bit-vec" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -118,12 +94,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.0.4" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -142,141 +113,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.3.2" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "cargo_metadata" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cat" -version = "0.0.1" -dependencies = [ - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "cc" -version = "1.0.36" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.7" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "chgrp" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "chmod" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "walker 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "chown" -version = "0.0.1" -dependencies = [ - "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "chrono" -version = "0.4.6" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "chroot" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "cksum" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "clap" -version = "2.33.0" +version = "2.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "clippy" -version = "0.0.212" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy_lints 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "clippy_lints" -version = "0.0.212" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -284,32 +155,123 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "comm" +name = "coreutils" version = "0.0.1" dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "cp" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "ioctl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "unindent 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "users 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uu_arch 0.0.1", + "uu_base32 0.0.1", + "uu_base64 0.0.1", + "uu_basename 0.0.1", + "uu_cat 0.0.1", + "uu_chgrp 0.0.1", + "uu_chmod 0.0.1", + "uu_chown 0.0.1", + "uu_chroot 0.0.1", + "uu_cksum 0.0.1", + "uu_comm 0.0.1", + "uu_cp 0.0.1", + "uu_cut 0.0.1", + "uu_date 0.0.1", + "uu_df 0.0.1", + "uu_dircolors 0.0.1", + "uu_dirname 0.0.1", + "uu_du 0.0.1", + "uu_echo 0.0.1", + "uu_env 0.0.1", + "uu_expand 0.0.1", + "uu_expr 0.0.1", + "uu_factor 0.0.1", + "uu_false 0.0.1", + "uu_fmt 0.0.1", + "uu_fold 0.0.1", + "uu_groups 0.0.1", + "uu_hashsum 0.0.1", + "uu_head 0.0.1", + "uu_hostid 0.0.1", + "uu_hostname 0.0.1", + "uu_id 0.0.1", + "uu_install 0.0.1", + "uu_join 0.0.1", + "uu_kill 0.0.1", + "uu_link 0.0.1", + "uu_ln 0.0.1", + "uu_logname 0.0.1", + "uu_ls 0.0.1", + "uu_mkdir 0.0.1", + "uu_mkfifo 0.0.1", + "uu_mknod 0.0.1", + "uu_mktemp 0.0.1", + "uu_more 0.0.1", + "uu_mv 0.0.1", + "uu_nice 0.0.1", + "uu_nl 0.0.1", + "uu_nohup 0.0.1", + "uu_nproc 0.0.1", + "uu_numfmt 0.0.1", + "uu_od 0.0.1", + "uu_paste 0.0.1", + "uu_pathchk 0.0.1", + "uu_pinky 0.0.1", + "uu_printenv 0.0.1", + "uu_printf 0.0.1", + "uu_ptx 0.0.1", + "uu_pwd 0.0.1", + "uu_readlink 0.0.1", + "uu_realpath 0.0.1", + "uu_relpath 0.0.1", + "uu_rm 0.0.1", + "uu_rmdir 0.0.1", + "uu_seq 0.0.1", + "uu_shred 0.0.1", + "uu_shuf 0.0.1", + "uu_sleep 0.0.1", + "uu_sort 0.0.1", + "uu_split 0.0.1", + "uu_stat 0.0.1", + "uu_stdbuf 0.0.1", + "uu_sum 0.0.1", + "uu_sync 0.0.1", + "uu_tac 0.0.1", + "uu_tail 0.0.1", + "uu_tee 0.0.1", + "uu_test 0.0.1", + "uu_timeout 0.0.1", + "uu_touch 0.0.1", + "uu_tr 0.0.1", + "uu_true 0.0.1", + "uu_truncate 0.0.1", + "uu_tsort 0.0.1", + "uu_tty 0.0.1", + "uu_uname 0.0.1", + "uu_unexpand 0.0.1", + "uu_uniq 0.0.1", + "uu_unlink 0.0.1", + "uu_uptime 0.0.1", + "uu_users 0.0.1", + "uu_wc 0.0.1", + "uu_who 0.0.1", + "uu_whoami 0.0.1", + "uu_yes 0.0.1", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -325,12 +287,12 @@ name = "cpp_build" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_common 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_syn 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_synmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_synom 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -340,7 +302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cpp_syn 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_synom 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -350,11 +312,11 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_common 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_syn 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_synom 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -386,39 +348,11 @@ dependencies = [ "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "cut" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "data-encoding" version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "date" -version = "0.0.1" -dependencies = [ - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "df" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "digest" version = "0.6.2" @@ -427,91 +361,16 @@ dependencies = [ "generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "dircolors" -version = "0.0.1" -dependencies = [ - "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "dirname" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "du" -version = "0.0.1" -dependencies = [ - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "dunce" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "echo" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "either" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "env" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "error-chain" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "expand" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "expr" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "onig 4.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "factor" -version = "0.0.1" -dependencies = [ - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "failure" version = "0.1.1" @@ -536,44 +395,22 @@ name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "false" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "filetime" -version = "0.2.5" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fmt" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "fold" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "fs_extra" version = "1.1.0" @@ -589,16 +426,16 @@ name = "generic-array" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getopts" -version = "0.2.19" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -611,41 +448,17 @@ name = "glob" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "groups" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "half" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "hashsum" -version = "0.0.1" +name = "hermit-abi" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "head" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -653,65 +466,14 @@ name = "hex" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "hostid" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "hostname" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hostname 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "hostname" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "match_cfg 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "id" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "if_chain" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "install" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -724,39 +486,18 @@ name = "isatty" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itertools" -version = "0.7.11" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itertools" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itoa" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "join" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -768,71 +509,22 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "kill" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "lazy_static" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.62" +version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "libstdbuf" -version = "0.0.1" +name = "log" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cpp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cpp_build 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "link" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "ln" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "logname" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "ls" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "term_grid 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "termsize 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -840,11 +532,6 @@ name = "match_cfg" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "md5" version = "0.3.8" @@ -855,147 +542,66 @@ name = "memchr" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memchr" -version = "2.2.0" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "mkdir" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "mkfifo" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "mknod" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "mktemp" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "more" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "mv" -version = "0.0.1" -dependencies = [ - "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "nice" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "nix" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "nl" -version = "0.0.1" +name = "nix" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "nodrop" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "nohup" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "nproc" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "num-integer" -version = "0.1.39" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.6" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "num_cpus" -version = "1.10.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1003,15 +609,7 @@ name = "number_prefix" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "numfmt" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1019,25 +617,14 @@ name = "numtoa" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "od" -version = "0.0.1" -dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "onig" -version = "4.3.2" +version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1046,42 +633,13 @@ name = "onig_sys" version = "69.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "paste" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "pathchk" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pinky" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1089,62 +647,16 @@ name = "platform-info" version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "printenv" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "printf" -version = "0.0.1" -dependencies = [ - "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" -version = "0.4.30" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ptx" -version = "0.0.1" -dependencies = [ - "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "pulldown-cmark" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pwd" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1152,11 +664,6 @@ name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quine-mc_cluskey" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "quote" version = "0.3.15" @@ -1164,10 +671,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.6.12" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1175,7 +682,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1185,10 +692,10 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1198,9 +705,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1208,17 +715,17 @@ name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1226,7 +733,7 @@ name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1235,12 +742,12 @@ name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand_core" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1264,9 +771,9 @@ name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1276,10 +783,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1287,8 +794,8 @@ name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1307,26 +814,9 @@ dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "readlink" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "realpath" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "redox_syscall" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1334,61 +824,31 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.1.6" +version = "1.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.7" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "relpath" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] [[package]] name = "remove_dir_all" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rm" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rmdir" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1396,35 +856,14 @@ name = "rust-ini" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "rust-users" -version = "0.6.0" -source = "git+https://github.com/uutils/rust-users#e64253f2b995e7f1a458c68a7eca66e0171d183a" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rustc-demangle" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ryu" -version = "0.2.8" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "same-file" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1436,7 +875,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1444,39 +882,6 @@ name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "seq" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "serde" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_derive" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sha1" version = "0.6.0" @@ -1505,90 +910,11 @@ dependencies = [ "generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "shred" -version = "0.0.1" -dependencies = [ - "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "shuf" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "sleep" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "smallvec" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "sort" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "split" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "stat" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "stdbuf" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libstdbuf 0.0.1", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "sum" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "syn" version = "0.11.11" @@ -1601,23 +927,12 @@ dependencies = [ [[package]] name = "syn" -version = "0.15.34" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sync" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1637,42 +952,13 @@ dependencies = [ "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tac" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "tail" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tee" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "tempdir" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1681,9 +967,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1692,17 +978,26 @@ name = "term_grid" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "term_size" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termion" -version = "1.5.2" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1711,36 +1006,28 @@ name = "termsize" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "test" -version = "0.0.1" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "term_size 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "thread_local" -version = "0.3.6" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1748,128 +1035,19 @@ name = "time" version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "timeout" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "toml" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "touch" -version = "0.0.1" -dependencies = [ - "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "tr" -version = "0.0.1" -dependencies = [ - "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "true" -version = "0.0.1" -dependencies = [ - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "truncate" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "tsort" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "tty" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "typenum" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ucd-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "uname" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "unexpand" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unicode-width" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1879,219 +1057,1026 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-xid" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unindent" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "uniq" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - [[package]] name = "unix_socket" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unlink" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "uptime" -version = "0.0.1" -dependencies = [ - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "users" -version = "0.0.1" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "utf8-ranges" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "uu_arch" +version = "0.0.1" +dependencies = [ + "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] [[package]] -name = "uucore" +name = "uu_base32" version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_base64" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_basename" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_cat" +version = "0.0.1" +dependencies = [ + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_chgrp" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_chmod" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "walker 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_chown" +version = "0.0.1" +dependencies = [ + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_chroot" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_cksum" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_comm" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_cp" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "ioctl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_cut" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_date" +version = "0.0.1" +dependencies = [ + "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_df" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_dircolors" +version = "0.0.1" +dependencies = [ + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_dirname" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_du" +version = "0.0.1" +dependencies = [ + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_echo" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_env" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_expand" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_expr" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "onig 4.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_factor" +version = "0.0.1" +dependencies = [ + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_false" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_fmt" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_fold" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_groups" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_hashsum" +version = "0.0.1" +dependencies = [ + "digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sha3 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_head" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_hostid" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_hostname" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hostname 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_id" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_install" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_join" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_kill" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_link" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_ln" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_logname" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_ls" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "term_grid 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "termsize 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_mkdir" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_mkfifo" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_mknod" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_mktemp" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_more" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_mv" +version = "0.0.1" +dependencies = [ + "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_nice" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_nl" +version = "0.0.1" +dependencies = [ + "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_nohup" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_nproc" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_numfmt" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_od" +version = "0.0.1" +dependencies = [ + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "half 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_paste" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_pathchk" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_pinky" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_printenv" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_printf" +version = "0.0.1" +dependencies = [ + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_ptx" +version = "0.0.1" +dependencies = [ + "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_pwd" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_readlink" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_realpath" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_relpath" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_rm" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_rmdir" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_seq" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_shred" +version = "0.0.1" +dependencies = [ + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_shuf" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_sleep" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_sort" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_split" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_stat" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_stdbuf" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "uu_stdbuf_libstdbuf 0.0.1", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_stdbuf_libstdbuf" +version = "0.0.1" +dependencies = [ + "cpp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cpp_build 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_sum" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_sync" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_tac" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_tail" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_tee" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_test" +version = "0.0.1" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_timeout" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_touch" +version = "0.0.1" +dependencies = [ + "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_tr" +version = "0.0.1" +dependencies = [ + "bit-set 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_true" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_truncate" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_tsort" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_tty" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_uname" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_unexpand" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_uniq" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_unlink" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_uptime" +version = "0.0.1" +dependencies = [ + "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_users" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_wc" +version = "0.0.1" +dependencies = [ + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_who" +version = "0.0.1" +dependencies = [ + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", +] + +[[package]] +name = "uu_whoami" +version = "0.0.1" +dependencies = [ + "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uu_yes" +version = "0.0.1" +dependencies = [ + "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", + "uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)", ] [[package]] name = "uucore" -version = "0.0.2" -source = "git+https://github.com/uutils/uucore/?tag=0.0.2#420b20f67267357f4f0f626a1e8a00a27304623d" +version = "0.0.4" +source = "git+https://github.com/uutils/uucore.git?branch=canary#9ada33368f1b8bfa3b39135a4a73c2b17d385b5f" dependencies = [ "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "dunce 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)", "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "uutils" -version = "0.0.1" +name = "uucore" +version = "0.0.4" +source = "git+https://github.com/uutils/uucore.git#6b7e1cd29812aa30e28b720fce0e52dcf25f9a74" dependencies = [ - "arch 0.0.1", "backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)", - "base32 0.0.1", - "base64 0.0.1", - "basename 0.0.1", - "cat 0.0.1", - "chgrp 0.0.1", - "chmod 0.0.1", - "chown 0.0.1", - "chroot 0.0.1", - "cksum 0.0.1", - "comm 0.0.1", - "cp 0.0.1", - "cut 0.0.1", - "date 0.0.1", - "df 0.0.1", - "dircolors 0.0.1", - "dirname 0.0.1", - "du 0.0.1", - "echo 0.0.1", - "env 0.0.1", - "expand 0.0.1", - "expr 0.0.1", - "factor 0.0.1", - "false 0.0.1", - "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "fmt 0.0.1", - "fold 0.0.1", - "groups 0.0.1", - "hashsum 0.0.1", - "head 0.0.1", - "hostid 0.0.1", - "hostname 0.0.1", - "id 0.0.1", - "install 0.0.1", - "join 0.0.1", - "kill 0.0.1", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "link 0.0.1", - "ln 0.0.1", - "logname 0.0.1", - "ls 0.0.1", - "mkdir 0.0.1", - "mkfifo 0.0.1", - "mknod 0.0.1", - "mktemp 0.0.1", - "more 0.0.1", - "mv 0.0.1", - "nice 0.0.1", - "nl 0.0.1", - "nohup 0.0.1", - "nproc 0.0.1", - "numfmt 0.0.1", - "od 0.0.1", - "paste 0.0.1", - "pathchk 0.0.1", - "pinky 0.0.1", - "printenv 0.0.1", - "printf 0.0.1", - "ptx 0.0.1", - "pwd 0.0.1", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "readlink 0.0.1", - "realpath 0.0.1", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "relpath 0.0.1", - "rm 0.0.1", - "rmdir 0.0.1", - "rust-users 0.6.0 (git+https://github.com/uutils/rust-users)", - "seq 0.0.1", - "shred 0.0.1", - "shuf 0.0.1", - "sleep 0.0.1", - "sort 0.0.1", - "split 0.0.1", - "stat 0.0.1", - "stdbuf 0.0.1", - "sum 0.0.1", - "sync 0.0.1", - "tac 0.0.1", - "tail 0.0.1", - "tee 0.0.1", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "test 0.0.1", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "timeout 0.0.1", - "touch 0.0.1", - "tr 0.0.1", - "true 0.0.1", - "truncate 0.0.1", - "tsort 0.0.1", - "tty 0.0.1", - "uname 0.0.1", - "unexpand 0.0.1", - "unindent 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "uniq 0.0.1", - "unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unlink 0.0.1", - "uptime 0.0.1", - "users 0.0.1", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "wc 0.0.1", - "who 0.0.1", - "whoami 0.0.1", - "yes 0.0.1", + "dunce 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "uucore_procs" +version = "0.0.4" +source = "git+https://github.com/uutils/uucore.git?branch=canary#9ada33368f1b8bfa3b39135a4a73c2b17d385b5f" +dependencies = [ + "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "vec_map" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2101,11 +2086,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "walkdir" -version = "2.2.8" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2114,32 +2099,6 @@ name = "walker" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "wc" -version = "0.0.1" -dependencies = [ - "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "who" -version = "0.0.1" -dependencies = [ - "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", -] - -[[package]] -name = "whoami" -version = "0.0.1" -dependencies = [ - "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "wild" version = "2.0.1" @@ -2155,7 +2114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2177,7 +2136,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2190,41 +2149,30 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "yes" -version = "0.0.1" -dependencies = [ - "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] "checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a" "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" -"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" +"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" -"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.30 (registry+https://github.com/rust-lang/crates.io-index)" = "ada4c783bb7e7443c14e0480f429ae2cc99da95065aeab7ee1b81ada0419404f" -"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" -"checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80" -"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" +"checksum backtrace-sys 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "18fbebbe1c9d1f383a9cc7e8ccdb471b91c8d024ee9c2ca5b5346121fe8b4399" +"checksum bit-set 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" +"checksum bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum block-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1339a1042f5d9f295737ad4d9a6ab6bf81c84a933dba110b9200cd6d1448b814" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" -"checksum cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1efca0b863ca03ed4c109fb1c55e0bc4bbeb221d3e103d86251046b06a526bd0" -"checksum cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a0c56216487bb80eec9c4516337b2588a4f2a2290d72a1416d930e4dcdb0c90d" -"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" -"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" -"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" -"checksum clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)" = "7e253af13a0cc39c7f22cf16f1be49d593dedc5895fe2fbb15f14d66ead00533" -"checksum clippy_lints 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)" = "bd2326065405649672adbd5cb30dad2fad3a470935653d51c70591d47d3a8512" +"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +"checksum cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)" = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" +"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cpp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d1cd8699ffa1b18fd388183f7762e0545eddbd5c6ec95e9e3b42a4a71a507ff" "checksum cpp_build 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c47531e7e09532ad4827098729794f5e1a5b1c2ccbb5e295498d2e7ab451c445" @@ -2236,62 +2184,56 @@ dependencies = [ "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" "checksum dunce 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0ad6bf6a88548d1126045c413548df1453d9be094a8ab9fd59bf1fdd338da4f" -"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" -"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" "checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2f8c63033fcba1f51ef744505b3cad42510432b904c062afa67ad7ece008429d" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" +"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" "checksum fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f2a4a2034423744d2cc7ca2068453168dcdb82c438419e639a26bd87839c674" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" -"checksum getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "72327b15c228bfe31f1390f93dd5e9279587f0463836393c9df719ce62a3e450" +"checksum getopts 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" -"checksum half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9353c2a89d550b58fa0061d8ed8d002a7d8cdf2494eb0e432859bd3a9e543836" +"checksum half 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a4e3d89dc66597bc3b70f24720bfb53cf0e086fbfbe63f2498e4edb95b36500c" +"checksum hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" "checksum hostname 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" "checksum ioctl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e2c4b26352496eaaa8ca7cfa9bd99e93419d3f7983dc6e99c2a35fe9e33504a" "checksum isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e31a8281fc93ec9693494da65fbf28c0c2aa60a2eaec25dc58e2f31952e95edc" -"checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d" -"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" +"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" +"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +"checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum match_cfg 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "79c56d6a0b07f9e19282511c83fc5b086364cbae4ba8c7d5f190c3d9b0425a48" "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" -"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +"checksum nix 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4dbdc256eaac2e3bd236d93ad999d3479ef775c863dbda3068c4006a92eec51b" "checksum nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "47e49f6982987135c5e9620ab317623e723bd06738fd85377e8d55f57c8b6487" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" -"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" -"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" +"checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" "checksum number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf9993e59c894e3c08aa1c2712914e9e6bf1fcbfc6bef283e2183df345a4fee" "checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" -"checksum onig 4.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a646989adad8a19f49be2090374712931c3a59835cb5277b4530f48b417f26e7" +"checksum onig 4.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8518fcb2b1b8c2f45f0ad499df4fda6087fc3475ca69a185c173b8315d2fb383" "checksum onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388410bf5fa341f10e58e6db3975f4bea1ac30247dd79d37a9e5ced3cb4cc3b0" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" +"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fd076acdc7a98374de6e300bf3af675997225bef21aecac2219553f04dd7e8" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" +"checksum proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" +"checksum quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" "checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" @@ -2299,60 +2241,50 @@ dependencies = [ "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" -"checksum regex-syntax 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d76410686f9e3a17f06128962e0ecc5755870bb890c34820c7af7f1db2e1d48" -"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" +"checksum regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +"checksum regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" +"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" -"checksum rust-users 0.6.0 (git+https://github.com/uutils/rust-users)" = "" -"checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" -"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" +"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +"checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd" -"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f" -"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha3 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26405905b6a56a94c60109cfda62610507ac14a65be531f5767dec5c5a8dd6a0" -"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" +"checksum syn 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "93a56fabc59dce20fe48b6c832cc249c713e7ed88fa28b0ee0a3bfcaae5fe4e2" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" "checksum term_grid 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "230d3e804faaed5a39b08319efb797783df2fd9671b39b7596490cb486d702cf" -"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" +"checksum term_size 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" +"checksum termion 1.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c22cec9d8978d906be5ac94bceb5a010d885c626c4c8855721a4dbd20e3ac905" "checksum termsize 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5e86d824a8e90f342ad3ef4bd51ef7119a9b681b0cc9f8ee7b2852f02ccd2517" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" -"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" +"checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unindent 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "834b4441326c660336850c5c0926cc20548e848967a5f57bc20c2b741c8d41f4" +"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum unindent 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "63f18aa3b0e35fed5a0048f029558b1518095ffe2a0a31fb87c93dece93a4993" "checksum unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa2700417c405c38f5e6902d699345241c28c0b7ade4abaad71e35a87eb1564" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" -"checksum uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d9991e24be65c5df85c9f16445554785a68e5ae7ec7feb230424ba35c24ebad7" -"checksum uucore 0.0.2 (git+https://github.com/uutils/uucore/?tag=0.0.2)" = "" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum users 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4227e95324a443c9fcb06e03d4d85e91aabe9a5a02aa818688b6918b6af486" +"checksum uucore 0.0.4 (git+https://github.com/uutils/uucore.git)" = "" +"checksum uucore 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)" = "" +"checksum uucore_procs 0.0.4 (git+https://github.com/uutils/uucore.git?branch=canary)" = "" +"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c7904a7e2bb3cdf0cf5e783f44204a85a37a93151738fa349f06680f59a98b45" +"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum walker 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44971d5e5ae4f7904dffb6260ebd3910e7bcae104a94730e04a24cb6af40646b" "checksum wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "690e5dbd46cfaf2f3bd09875ad94e92cc56459fce505807d6ce5332671aa93ae" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" +"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" diff --git a/Cargo.toml b/Cargo.toml index bc1eeb23c..6ef2e022f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,20 @@ -# uutils / coreutils +# coreutils (uutils) # * see the repository LICENSE, README, and CONTRIBUTING files for more information [package] -name = "uutils" -description = "uutils ~ universal (as in cross-platform) CLI utils, written in Rust" +name = "coreutils" +version = "0.0.1" # "0.0.1.1" +authors = ["uutils developers"] license = "MIT" +description = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust" + +homepage = "https://github.com/uutils/coreutils" repository = "https://github.com/uutils/coreutils" -version = "0.0.1" -authors = [] +readme = "README.md" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" + build = "build.rs" autotests = false @@ -210,111 +217,118 @@ feat_os_windows_legacy = [ "touch", "whoami", ] +## +# * bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing) +test = [ "uu_test" ] [workspace] [dependencies] 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" } +uucore = { version="0.0.4", 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" } +uu_test = { optional=true, version="0.0.1", package="uu_test", path="src/uu/test" } # -# * 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" } +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" } +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" } +# +# * pinned transitive dependencies +pin_backtrace = { version=">= 0.3.3, <= 0.3.30", package="backtrace" } ## via 'failure'; pin to <= v0.3.30 to avoid increasing MinSRV to v1.33.0 +pin_half = { version="1.1.0, < 1.4.0", package="half" } ## half v1.4.0 has compiler errors for MinSRV v1.31.0 +pin_same-file = { version="1.0.4, < 1.0.6", package="same-file" } ## same-file v1.0.6 has compiler errors for MinSRV v1.31.0 +pin_winapi-util = { version="0.1.2, < 0.1.3", package="winapi-util" } ## winapi-util v0.1.3 has compiler errors for MinSRV v1.31.0 [dev-dependencies] filetime = "0.2" @@ -324,17 +338,15 @@ regex = "1.0" tempdir = "0.3" time = "0.1" unindent = "0.1" +uucore = { version="0.0.4", 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" } unix_socket = "0.5.0" [[bin]] -name = "uutils" -path = "src/bin/uutils.rs" +name = "coreutils" +path = "src/bin/coreutils.rs" [[test]] name = "tests" - -[patch.crates-io] -uucore = { git = "https://github.com/uutils/uucore/", tag = "0.0.2" } diff --git a/Makefile.toml b/Makefile.toml index fd301a925..0a72a4658 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1,6 +1,4 @@ -# spell-checker:ignore (cargo-make) duckscript macos -# spell-checker:ignore (rust) clippy -# spell-checker:ignore (uutils) uutil uutils +# spell-checker:ignore (cargo-make) duckscript [config] min_version = "0.26.2" @@ -81,10 +79,16 @@ if is_empty "${args_examples}" end_if set_env CARGO_MAKE_TASK_BUILD_EXAMPLES_ARGS "${args_examples}" # * rebuild for 'utils' target -args_utils = replace ${args} ";" " -p" -if not is_empty "${args_utils}" - args_utils = set "-p${args_utils}" -end_if +args_utils_list = split "${args}" ";" +for arg in "${args_utils_list}" + if not is_empty "${arg}" + if not starts_with "${arg}" "uu_" + arg = set "uu_${arg}" + end_if + args_utils = set "${args_utils} -p${arg}" + end_if +end +args_utils = trim "${args_utils}" set_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS "${args_utils}" ''' ] @@ -118,7 +122,7 @@ dependencies = [ ] [tasks.build-examples] -description = "## Build (release-mode) project example(s); usage: `cargo make (build-examples | examples | example) [EXAMPLE]...`" +description = "## Build (release-mode) project example(s); usage: `cargo make (build-examples | examples) [EXAMPLE]...`" category = "[project]" dependencies = [ "core::pre-build", @@ -135,11 +139,18 @@ dependencies = [ "core::post-build", ] +[tasks.build-release] +alias = "build" + [tasks.debug] alias = "build-debug" [tasks.example] -alias = "build-examples" +description = "hidden singular-form alias for 'examples'" +category = "[project]" +dependencies = [ + "examples", +] [tasks.examples] alias = "build-examples" @@ -148,11 +159,10 @@ alias = "build-examples" alias = "build-features" [tasks.format] -description = "## Format code files (with `cargo fmt`)" +description = "## Format code files (with `cargo fmt`; includes tests)" category = "[project]" dependencies = [ "action-format", - "action-determine-tests", "action-format-tests", ] @@ -205,10 +215,7 @@ command = "cargo" args = ["uninstall"] [tasks.util] -alias = "utils" - -[tasks.utils] -description = "## Build (individual; release-mode) utilities; usage: `cargo make (util | utils | uutil | uutils) [UTIL_NAME...]`" +description = "## Build (individual; release-mode) utilities; usage: `cargo make (util | uutil) [UTIL_NAME...]`" category = "[project]" dependencies = [ "core::pre-build", @@ -217,11 +224,22 @@ dependencies = [ "core::post-build", ] +[tasks.utils] +description = "hidden plural-form alias for 'util'" +category = "[project]" +dependencies = [ + "util", +] + [tasks.uutil] alias = "utils" [tasks.uutils] -alias = "utils" +description = "hidden plural-form alias for 'util'" +category = "[project]" +dependencies = [ + "util", +] ### actions @@ -247,6 +265,9 @@ args = ["build", "--release", "--no-default-features", "--features", "${CARGO_MA [tasks.action-build-utils] description = "Build individual utilities" +dependencies = [ + "action-determine-utils", +] command = "cargo" # args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ] args = ["build", "--release", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )" ] @@ -263,11 +284,21 @@ script = [ package_options = get_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS if is_empty "${package_options}" show_utils = get_env CARGO_MAKE_VAR_SHOW_UTILS - result = exec "${show_utils}" + features = get_env CARGO_MAKE_VAR_BUILD_TEST_FEATURES + if not is_empty "${features}" + result = exec "${show_utils}" --features "${features}" + else + result = exec "${show_utils}" + endif set_env CARGO_MAKE_VAR_UTILS ${result.stdout} utils = array %{result.stdout} for util in ${utils} - package_options = set "${package_options} -p${util}" + if not is_empty "${util}" + if not starts_with "${util}" "uu_" + util = set "uu_${util}" + end_if + package_options = set "${package_options} -p${util}" + end_if end package_options = trim "${package_options}" end_if @@ -281,10 +312,13 @@ script = [ ''' test_files = glob_array tests/**/*.rs for file in ${test_files} - if is_empty "${tests}" - tests = set "${file}" - else - tests = set "${tests} ${file}" + file = replace "${file}" "\\" "/" + if not is_empty ${file} + if is_empty "${tests}" + tests = set "${file}" + else + tests = set "${tests} ${file}" + end_if end_if end set_env CARGO_MAKE_VAR_TESTS "${tests}" @@ -298,6 +332,9 @@ args = ["fmt"] [tasks.action-format-tests] description = "`cargo fmt` tests" +dependencies = [ + "action-determine-tests", +] command = "cargo" args = ["fmt", "--", "@@split(CARGO_MAKE_VAR_TESTS, )"] @@ -342,7 +379,7 @@ script = [ target = array_pop ${line_segments} target = trim ${target} l = length ${target} - r = range 0 20 + r = range 0 18 spacing = set "" for i in ${r} if greater_than ${i} ${l} diff --git a/build.rs b/build.rs index 833c91112..6998d60a4 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (vars) krate + use std::env; use std::fs::File; use std::io::Write; @@ -8,66 +10,89 @@ pub fn main() { println!("cargo:rustc-cfg=build={:?}", profile); } - let feature_prefix = "CARGO_FEATURE_"; + let env_feature_prefix: &str = "CARGO_FEATURE_"; + let feature_prefix: &str = "feat_"; + let override_prefix: &str = "uu_"; + let out_dir = env::var("OUT_DIR").unwrap(); let mut crates = Vec::new(); for (key, val) in env::vars() { - if val == "1" && key.starts_with(feature_prefix) { - let krate = key[feature_prefix.len()..].to_lowercase(); + if val == "1" && key.starts_with(env_feature_prefix) { + let krate = key[env_feature_prefix.len()..].to_lowercase(); match krate.as_ref() { - "default" | "macos" | "unix" | "windows" => continue, - "nightly" | "test_unimplemented" => continue, - s if s.starts_with("feat_") => continue, - _ => {} + "default" | "macos" | "unix" | "windows" => continue, // common/standard feature names + "nightly" | "test_unimplemented" => continue, // crate-local custom features + "test" => continue, // over-ridden with 'uu_test' to avoid collision with rust core crate 'test' + s if s.starts_with(feature_prefix) => continue, // crate feature sets + _ => {} // util feature name } crates.push(krate.to_string()); } } crates.sort(); - let mut cf = File::create(Path::new(&out_dir).join("uutils_crates.rs")).unwrap(); let mut mf = File::create(Path::new(&out_dir).join("uutils_map.rs")).unwrap(); mf.write_all( + "type UtilityMap = HashMap<&'static str, fn(Vec) -> i32>;\n\ + \n\ + fn util_map() -> UtilityMap {\n\ + \tlet mut map: UtilityMap = HashMap::new();\n\ " - type UtilityMap = HashMap<&'static str, fn(Vec) -> i32>; - - fn util_map() -> UtilityMap { - let mut map: UtilityMap = HashMap::new();\n" - .as_bytes(), + .as_bytes(), ) .unwrap(); for krate in crates { - 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" - .as_bytes(), + k if k.starts_with(override_prefix) => mf + .write_all( + format!( + "\tmap.insert(\"{k}\", {krate}::uumain);\n", + k = krate[override_prefix.len()..].to_string(), + krate = krate + ) + .as_bytes(), ) - .unwrap(); - } + .unwrap(), + "false" | "true" => mf + .write_all( + format!( + "\tmap.insert(\"{krate}\", r#{krate}::uumain);\n", + krate = krate + ) + .as_bytes(), + ) + .unwrap(), + "hashsum" => mf + .write_all( + format!( + "\ + \tmap.insert(\"{krate}\", {krate}::uumain);\n\ + \t\tmap.insert(\"md5sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha1sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha224sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha256sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha384sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha512sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha3sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha3-224sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha3-256sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha3-384sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"sha3-512sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"shake128sum\", {krate}::uumain);\n\ + \t\tmap.insert(\"shake256sum\", {krate}::uumain);\n\ + ", + krate = krate + ) + .as_bytes(), + ) + .unwrap(), _ => mf .write_all( format!( - "map.insert(\"{krate}\", uu_{krate}::uumain);\n", + "\tmap.insert(\"{krate}\", {krate}::uumain);\n", krate = krate ) .as_bytes(), @@ -78,6 +103,5 @@ pub fn main() { mf.write_all(b"map\n}\n").unwrap(); - cf.flush().unwrap(); mf.flush().unwrap(); } diff --git a/examples/busybox-core.rs b/examples/busybox-core.rs new file mode 100644 index 000000000..89dd1848d --- /dev/null +++ b/examples/busybox-core.rs @@ -0,0 +1 @@ +include!("../src/bin/coreutils.rs"); diff --git a/examples/busybox.rs b/examples/busybox.rs deleted file mode 100644 index f2516b124..000000000 --- a/examples/busybox.rs +++ /dev/null @@ -1 +0,0 @@ -include!("../src/bin/uutils.rs"); diff --git a/examples/uu.rs b/examples/uu.rs deleted file mode 100644 index f2516b124..000000000 --- a/examples/uu.rs +++ /dev/null @@ -1 +0,0 @@ -include!("../src/bin/uutils.rs"); diff --git a/examples/uuc.rs b/examples/uuc.rs new file mode 100644 index 000000000..89dd1848d --- /dev/null +++ b/examples/uuc.rs @@ -0,0 +1 @@ +include!("../src/bin/coreutils.rs"); diff --git a/src/bin/uutils.rs b/src/bin/coreutils.rs similarity index 86% rename from src/bin/uutils.rs rename to src/bin/coreutils.rs index fe8128bb0..f76628520 100644 --- a/src/bin/uutils.rs +++ b/src/bin/coreutils.rs @@ -1,18 +1,9 @@ -/* - * 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. - */ - -// spell-checker:ignore (acronyms/names) Gehring -// spell-checker:ignore (rustlang/crates) clippy concat rustlang termwidth textwrap -// spell-checker:ignore (uutils) coreutils sigpipe uucore uumain uutils -// spell-checker:ignore (shell) busybox symlinks - -include!(concat!(env!("OUT_DIR"), "/uutils_crates.rs")); +// 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 lazy_static; extern crate textwrap; @@ -53,7 +44,7 @@ fn usage(utils: &UtilityMap) { } fn main() { - uucore::panic::install_sigpipe_hook(); + uucore::panic::mute_sigpipe_panic(); let utils = util_map(); let mut args: Vec = uucore::args().collect(); diff --git a/src/common/mkmain.rs b/src/common/mkmain.rs deleted file mode 100644 index 4ae471c41..000000000 --- a/src/common/mkmain.rs +++ /dev/null @@ -1,36 +0,0 @@ -use std::env; -use std::fs::File; -use std::io::Write; -use std::path::Path; - -static TEMPLATE: &str = "\ -extern crate uu_@UTIL_CRATE@; -extern crate uucore; - -use std::io::Write; -use uu_@UTIL_CRATE@::uumain; - -fn main() { - uucore::panic::install_sigpipe_hook(); - - let code = uumain(uucore::args().collect()); - // Since stdout is line-buffered by default, we need to ensure any pending - // writes are flushed before exiting. Ideally, this should be enforced by - // each utility. - // - // See: https://github.com/rust-lang/rust/issues/23818 - // - std::io::stdout().flush().expect(\"could not flush stdout\"); - std::process::exit(code); -} -"; - -pub fn main() { - let out_dir = env::var("OUT_DIR").unwrap(); - let pkgname = env::var("CARGO_PKG_NAME").unwrap(); - - let main = TEMPLATE.replace("@UTIL_CRATE@", &pkgname); - let mut file = File::create(&Path::new(&out_dir).join("main.rs")).unwrap(); - - write!(file, "{}", main).unwrap(); -} diff --git a/src/common/uumain.rs b/src/common/uumain.rs deleted file mode 100644 index d3c87408c..000000000 --- a/src/common/uumain.rs +++ /dev/null @@ -1 +0,0 @@ -include!(concat!(env!("OUT_DIR"), "/main.rs")); diff --git a/src/uu/arch/Cargo.toml b/src/uu/arch/Cargo.toml index 7fc71e1b4..9ab1da6dc 100644 --- a/src/uu/arch/Cargo.toml +++ b/src/uu/arch/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "arch" +name = "uu_arch" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "arch ~ (uutils) display machine architecture" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/arch" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_arch" path = "src/arch.rs" [dependencies] platform-info = "0.0.1" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..69747add2 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] @@ -20,7 +17,7 @@ static SUMMARY: &str = "Determine architecture name for current machine."; static LONG_HELP: &str = ""; pub fn uumain(args: Vec) -> i32 { - new_coreopts!(SYNTAX, SUMMARY, LONG_HELP).parse(args); + app!(SYNTAX, SUMMARY, LONG_HELP).parse(args); let uts = return_if_err!(1, PlatformInfo::new()); println!("{}", uts.machine().trim()); 0 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..ea1482858 100644 --- a/src/uu/base32/Cargo.toml +++ b/src/uu/base32/Cargo.toml @@ -1,19 +1,23 @@ [package] -name = "base32" +name = "uu_base32" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "base32 ~ (uutils) decode/encode input (base32-encoding)" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/base32" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_base32" path = "src/base32.rs" [dependencies] -uucore = { version = "0.0.2", features = ["encoding"] } -## optional -clippy = { version = "0.0.212", optional = true } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features = ["encoding"] } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[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..f6db40692 --- /dev/null +++ b/src/uu/base32/src/base_common.rs @@ -0,0 +1,92 @@ +// 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 std::fs::File; +use std::io::{stdin, BufReader, Read}; +use std::path::Path; + +use uucore::encoding::{wrap_print, Data, Format}; + +pub fn execute( + args: Vec, + syntax: &str, + summary: &str, + long_help: &str, + format: Format, +) -> i32 { + let matches = app!(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 { + show_usage_error!("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..ea83605a0 100644 --- a/src/uu/base64/Cargo.toml +++ b/src/uu/base64/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "base64" +name = "uu_base64" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "base64 ~ (uutils) decode/encode input (base64-encoding)" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/base64" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_base64" path = "src/base64.rs" [dependencies] -uucore = { version = "0.0.2", features = ["encoding"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features = ["encoding"] } +uucore_procs = { version="0.0.4", 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..595e2ece7 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 @@ -7,7 +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/base64/src/base_common.rs b/src/uu/base64/src/base_common.rs index 1bb09ace1..f6db40692 100644 --- a/src/uu/base64/src/base_common.rs +++ b/src/uu/base64/src/base_common.rs @@ -6,15 +6,13 @@ // // 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; +use uucore::encoding::{wrap_print, Data, Format}; + pub fn execute( args: Vec, syntax: &str, @@ -22,7 +20,7 @@ pub fn execute( long_help: &str, format: Format, ) -> i32 { - let matches = new_coreopts!(syntax, summary, long_help) + let matches = app!(syntax, summary, long_help) .optflag("d", "decode", "decode data") .optflag( "i", @@ -47,7 +45,7 @@ pub fn execute( let decode = matches.opt_present("decode"); if matches.free.len() > 1 { - disp_err!("extra operand ‘{}’", matches.free[0]); + show_usage_error!("extra operand ‘{}’", matches.free[0]); return 1; } 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..8373c9fc6 100644 --- a/src/uu/basename/Cargo.toml +++ b/src/uu/basename/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "basename" +name = "uu_basename" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "basename ~ (uutils) display PATHNAME with leading directory components removed" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/basename" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_basename" path = "src/basename.rs" [dependencies] -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..55995ad4f 100644 --- a/src/uu/basename/src/basename.rs +++ b/src/uu/basename/src/basename.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) fullname #[macro_use] extern crate uucore; @@ -24,7 +22,7 @@ pub fn uumain(args: Vec) -> i32 { // // Argument parsing // - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag( "a", "multiple", 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..02f7354c3 100644 --- a/src/uu/cat/Cargo.toml +++ b/src/uu/cat/Cargo.toml @@ -1,21 +1,27 @@ [package] -name = "cat" +name = "uu_cat" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "cat ~ (uutils) concatenate and display input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/cat" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..f207dae1e 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,8 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// + +// spell-checker:ignore (ToDO) nonprint nonblank nonprinting #[macro_use] extern crate quick_error; @@ -126,7 +125,7 @@ enum InputType { type CatResult = Result; pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag("A", "show-all", "equivalent to -vET") .optflag( "b", @@ -268,7 +267,7 @@ fn open(path: &str) -> CatResult { /// /// # Arguments /// -/// * `files` - There is no short circuit when encountiner an error +/// * `files` - There is no short circuit when encountering an error /// reading a file in this vector fn write_fast(files: Vec) -> CatResult<()> { let mut writer = stdout(); @@ -313,7 +312,7 @@ struct OutputState { /// /// # Arguments /// -/// * `files` - There is no short circuit when encountiner an error +/// * `files` - There is no short circuit when encountering an error /// reading a file in this vector fn write_lines(files: Vec, options: &OutputOptions) -> CatResult<()> { let mut error_count = 0; @@ -335,7 +334,7 @@ fn write_lines(files: Vec, options: &OutputOptions) -> CatResult<()> { } } -/// Outputs file contents to stdout in a linewise fashion, +/// Outputs file contents to stdout in a line-by-line fashion, /// propagating any errors that might occur. fn write_file_lines(file: &str, options: &OutputOptions, state: &mut OutputState) -> CatResult<()> { let mut handle = open(file)?; 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..4e5b6b3b2 100644 --- a/src/uu/chgrp/Cargo.toml +++ b/src/uu/chgrp/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "chgrp" +name = "uu_chgrp" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "chgrp ~ (uutils) change the group ownership of FILE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/chgrp" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_chgrp" path = "src/chgrp.rs" [dependencies] -uucore = { version = "0.0.2", features = ["entries", "fs"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "fs"] } +uucore_procs = { version="0.0.4", 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..f381bcbb3 100644 --- a/src/uu/chgrp/src/chgrp.rs +++ b/src/uu/chgrp/src/chgrp.rs @@ -1,12 +1,11 @@ -#![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. -// + +// spell-checker:ignore (ToDO) COMFOLLOW Chgrper RFILE RFILE's derefer dgid nonblank nonprint nonprinting #[macro_use] extern crate uucore; @@ -38,7 +37,7 @@ const FTS_PHYSICAL: u8 = 1 << 1; const FTS_LOGICAL: u8 = 1 << 2; pub fn uumain(args: Vec) -> i32 { - let mut opts = new_coreopts!(SYNTAX, SUMMARY, ""); + let mut opts = app!(SYNTAX, SUMMARY, ""); opts.optflag("c", "changes", "like verbose but report only when a change is made") @@ -118,10 +117,10 @@ pub fn uumain(args: Vec) -> i32 { }; if matches.free.is_empty() { - disp_err!("missing operand"); + show_usage_error!("missing operand"); return 1; } else if matches.free.len() < 2 && !matches.opt_present("reference") { - disp_err!("missing operand after ‘{}’", matches.free[0]); + show_usage_error!("missing operand after ‘{}’", matches.free[0]); return 1; } 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..eff0cc186 100644 --- a/src/uu/chmod/Cargo.toml +++ b/src/uu/chmod/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "chmod" +name = "uu_chmod" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "chmod ~ (uutils) change mode of FILE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/chmod" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_chmod" path = "src/chmod.rs" [dependencies] libc = "0.2.42" -uucore = { version = "0.0.2", features = ["mode"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs", "mode"] } +uucore_procs = { version="0.0.4", 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..77a56c071 100644 --- a/src/uu/chmod/src/chmod.rs +++ b/src/uu/chmod/src/chmod.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) Chmoder cmode fmode fperm fref ugoa RFILE RFILE's #[cfg(unix)] extern crate libc; @@ -38,7 +36,7 @@ pub fn uumain(mut args: Vec) -> i32 { {0} [OPTION]... --reference=RFILE FILE...", NAME ); - let mut opts = new_coreopts!(&syntax, SUMMARY, LONG_HELP); + let mut opts = app!(&syntax, SUMMARY, LONG_HELP); opts.optflag( "c", "changes", @@ -65,7 +63,7 @@ pub fn uumain(mut args: Vec) -> i32 { ) .optflag("R", "recursive", "change files and directories recursively"); - // sanitize input for - at beginning (e.g. chmod -x testfile). Remove + // sanitize input for - at beginning (e.g. chmod -x test_file). Remove // the option and save it for later, after parsing is finished. let negative_option = sanitize_input(&mut args); 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..5b3148b28 100644 --- a/src/uu/chown/Cargo.toml +++ b/src/uu/chown/Cargo.toml @@ -1,23 +1,25 @@ [package] -name = "chown" +name = "uu_chown" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "chown ~ (uutils) change the ownership of FILE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/chown" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "fs"] } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } walkdir = "2.2" -[dependencies.clippy] -version = "0.0.212" -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..81f2d1e5b 100644 --- a/src/uu/chown/src/chown.rs +++ b/src/uu/chown/src/chown.rs @@ -1,13 +1,11 @@ -#![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))] + +// spell-checker:ignore (ToDO) COMFOLLOW Chowner Passwd RFILE RFILE's derefer dgid duid #[macro_use] extern crate uucore; @@ -39,7 +37,7 @@ const FTS_PHYSICAL: u8 = 1 << 1; const FTS_LOGICAL: u8 = 1 << 2; pub fn uumain(args: Vec) -> i32 { - let mut opts = new_coreopts!(SYNTAX, SUMMARY, ""); + let mut opts = app!(SYNTAX, SUMMARY, ""); opts.optflag("c", "changes", "like verbose but report only when a change is made") @@ -137,10 +135,10 @@ pub fn uumain(args: Vec) -> i32 { }; if matches.free.is_empty() { - disp_err!("missing operand"); + show_usage_error!("missing operand"); return 1; } else if matches.free.len() < 2 && !matches.opt_present("reference") { - disp_err!("missing operand after ‘{}’", matches.free[0]); + show_usage_error!("missing operand after ‘{}’", matches.free[0]); return 1; } 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..b8a931c09 100644 --- a/src/uu/chroot/Cargo.toml +++ b/src/uu/chroot/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "chroot" +name = "uu_chroot" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "chroot ~ (uutils) run COMMAND under a new root directory" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/chroot" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_chroot" path = "src/chroot.rs" [dependencies] getopts = "0.2.18" -uucore = { version = "0.0.2", features = ["entries"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries"] } +uucore_procs = { version="0.0.4", 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..f439e1f4f 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -1,14 +1,12 @@ -#![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. - */ +// spell-checker:ignore (ToDO) NEWROOT Userspec pstatus extern crate getopts; @@ -32,7 +30,7 @@ static LONG_HELP: &str = " "; pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optopt( "u", "user", 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..ae6b29534 100644 --- a/src/uu/cksum/Cargo.toml +++ b/src/uu/cksum/Cargo.toml @@ -1,17 +1,24 @@ [package] -name = "cksum" +name = "uu_cksum" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" +description = "cksum ~ (uutils) display CRC and size of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/cksum" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_cksum" path = "src/cksum.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..a9edd0d59 100644 --- a/src/uu/cksum/build.rs +++ b/src/uu/cksum/build.rs @@ -1,12 +1,10 @@ -/* -* This file is part of the uutils coreutils package. -* -* (c) Alex Lyon -* (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) Alex Lyon +// (c) Michael Gehring +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. use std::env; use std::fs::File; @@ -15,12 +13,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..f22cf91f5 100644 --- a/src/uu/cksum/src/cksum.rs +++ b/src/uu/cksum/src/cksum.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) fname #[macro_use] extern crate uucore; @@ -74,7 +72,7 @@ fn cksum(fname: &str) -> io::Result<(u32, usize)> { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP).parse(args); + let matches = app!(SYNTAX, SUMMARY, LONG_HELP).parse(args); let files = matches.free; 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..57cdbc0c4 100644 --- a/src/uu/comm/Cargo.toml +++ b/src/uu/comm/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "comm" +name = "uu_comm" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "comm ~ (uutils) compare sorted inputs" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/comm" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..e2517ee60 100644 --- a/src/uu/comm/src/comm.rs +++ b/src/uu/comm/src/comm.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) delim mkdelim extern crate getopts; @@ -124,7 +122,7 @@ fn open_file(name: &str) -> io::Result { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag("1", "", "suppress column 1 (lines uniq to FILE1)") .optflag("2", "", "suppress column 2 (lines uniq to FILE2)") .optflag( 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..9fa97ccb0 100644 --- a/src/uu/cp/Cargo.toml +++ b/src/uu/cp/Cargo.toml @@ -1,15 +1,21 @@ [package] -name = "cp" +name = "uu_cp" version = "0.0.1" authors = [ - "Jordy Dickinson ", - "Joshua S. Miller ", + "Jordy Dickinson ", + "Joshua S. Miller ", + "uutils developers", ] license = "MIT" -build = "../../common/mkmain.rs" +description = "cp ~ (uutils) copy SOURCE to DESTINATION" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/cp" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_cp" path = "src/cp.rs" [dependencies] @@ -17,19 +23,19 @@ 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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } walkdir = "2.2.8" [target.'cfg(target_os = "linux")'.dependencies] ioctl-sys = "0.5.2" [target.'cfg(target_os = "windows")'.dependencies] -kernel32-sys = "0.2.2" -winapi = "0.3" +winapi = { version="0.3", features=["fileapi"] } [target.'cfg(unix)'.dependencies] xattr="0.2.1" [[bin]] name = "cp" -path = "../../common/uumain.rs" +path = "src/main.rs" diff --git a/src/uu/cp/README.md b/src/uu/cp/README.md index d536e5c47..91753eb66 100644 --- a/src/uu/cp/README.md +++ b/src/uu/cp/README.md @@ -1,5 +1,10 @@ + + + ## Feature list + + ### To Do - [ ] archive diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 74e12c487..01e911b58 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1,15 +1,14 @@ -#![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. + +// spell-checker:ignore (ToDO) ficlone linkgs lstat nlink nlinks pathbuf reflink strs xattrs extern crate clap; extern crate filetime; @@ -25,14 +24,12 @@ extern crate walkdir; #[cfg(unix)] extern crate xattr; -#[cfg(windows)] -extern crate kernel32; -#[cfg(windows)] -use kernel32::CreateFileW; -#[cfg(windows)] -use kernel32::GetFileInformationByHandle; #[cfg(windows)] extern crate winapi; +#[cfg(windows)] +use winapi::um::fileapi::CreateFileW; +#[cfg(windows)] +use winapi::um::fileapi::GetFileInformationByHandle; use clap::{App, Arg, ArgMatches}; use filetime::FileTime; @@ -695,7 +692,7 @@ fn parse_path_args(path_args: &[String], options: &Options) -> CopyResult<(Vec { - // All path arges are sources, and the target dir was + // All path args are sources, and the target dir was // specified separately (paths, PathBuf::from(target)) } @@ -872,7 +869,7 @@ fn copy_source( /// Read the contents of the directory `root` and recursively copy the /// contents to `target`. /// -/// Any errors encounted copying files in the tree will be logged but +/// Any errors encountered copying files in the tree will be logged but /// will not cause a short-circuit. fn copy_directory(root: &Path, target: &Target, options: &Options) -> CopyResult<()> { if !options.recursive { @@ -1046,7 +1043,7 @@ fn handle_existing_dest(source: &Path, dest: &Path, options: &Options) -> CopyRe } /// Copy the a file from `source` to `dest`. No path manipulation is -/// done on either `source` or `dest`, the are used as provieded. +/// done on either `source` or `dest`, the are used as provided. /// /// Behavior when copying to existing files is contingent on the /// `options.overwrite` mode. If a file is skipped, the return type 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/.gitignore b/src/uu/cut/.gitignore deleted file mode 100644 index eb5a316cb..000000000 --- a/src/uu/cut/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target diff --git a/src/uu/cut/Cargo.toml b/src/uu/cut/Cargo.toml index 59bb0f56d..d504cebb3 100644 --- a/src/uu/cut/Cargo.toml +++ b/src/uu/cut/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "cut" +name = "uu_cut" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "cut ~ (uutils) display byte/field columns of input lines" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/cut" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_cut" path = "src/cut.rs" [dependencies] -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/buffer.rs b/src/uu/cut/src/buffer.rs index 54003f274..7ee26612e 100644 --- a/src/uu/cut/src/buffer.rs +++ b/src/uu/cut/src/buffer.rs @@ -1,14 +1,13 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Rolf Morel - * (c) kwantam - * substantially rewritten to use the stdlib BufReader trait - * rather than re-implementing it here. - * - * 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 +// (c) kwantam +// * substantial rewrite to use the `std::io::BufReader` trait +// +// For the full copyright and license information, please view the LICENSE +// file that was distributed with this source code. + +// spell-checker:ignore (ToDO) SRes Newl use std::io::Result as IoResult; use std::io::{BufRead, BufReader, Read, Write}; diff --git a/src/uu/cut/src/cut.rs b/src/uu/cut/src/cut.rs index 81712ad43..4c2dd8b58 100644 --- a/src/uu/cut/src/cut.rs +++ b/src/uu/cut/src/cut.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) delim sourcefiles #[macro_use] extern crate uucore; @@ -16,8 +14,8 @@ use std::fs::File; use std::io::{stdin, stdout, BufRead, BufReader, Read, Stdout, Write}; use std::path::Path; -use ranges::Range; -use searcher::Searcher; +use self::ranges::Range; +use self::searcher::Searcher; mod buffer; mod ranges; @@ -114,7 +112,7 @@ struct Options { struct FieldOptions { delimiter: String, // one char long, String because of UTF8 representation - out_delimeter: Option, + out_delimiter: Option, only_delimited: bool, zero_terminated: bool, } @@ -134,8 +132,8 @@ fn list_to_ranges(list: &str, complement: bool) -> Result, String> { } fn cut_bytes(reader: R, ranges: &[Range], opts: &Options) -> i32 { - use buffer::Bytes::Select; - use buffer::Bytes::Selected::*; + use self::buffer::Bytes::Select; + use self::buffer::Bytes::Selected::*; let newline_char = if opts.zero_terminated { b'\0' } else { b'\n' }; let mut buf_read = buffer::ByteReader::new(reader, newline_char); @@ -292,7 +290,7 @@ fn cut_fields_delimiter( #[allow(clippy::cognitive_complexity)] fn cut_fields(reader: R, ranges: &[Range], opts: &FieldOptions) -> i32 { let newline_char = if opts.zero_terminated { b'\0' } else { b'\n' }; - if let Some(ref o_delim) = opts.out_delimeter { + if let Some(ref o_delim) = opts.out_delimiter { return cut_fields_delimiter( reader, ranges, @@ -426,7 +424,7 @@ fn cut_files(mut filenames: Vec, mode: Mode) -> i32 { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optopt("b", "bytes", "filter byte columns from the input source", "sequence") .optopt("c", "characters", "alias for character mode", "sequence") .optopt("d", "delimiter", "specify the delimiter character that separates fields in the input source. Defaults to Tab.", "delimiter") @@ -502,7 +500,7 @@ pub fn uumain(args: Vec) -> i32 { ranges, FieldOptions { delimiter: delim, - out_delimeter: out_delim, + out_delimiter: out_delim, only_delimited, zero_terminated, }, @@ -513,7 +511,7 @@ pub fn uumain(args: Vec) -> i32 { ranges, FieldOptions { delimiter: "\t".to_owned(), - out_delimeter: out_delim, + out_delimiter: out_delim, only_delimited, zero_terminated, }, 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/cut/src/ranges.rs b/src/uu/cut/src/ranges.rs index 85b20fe38..74fec08e6 100644 --- a/src/uu/cut/src/ranges.rs +++ b/src/uu/cut/src/ranges.rs @@ -1,11 +1,11 @@ -/* - * 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. + +// spell-checker:ignore (ToDO) inval use std::str::FromStr; diff --git a/src/uu/cut/src/searcher.rs b/src/uu/cut/src/searcher.rs index 2394ca539..f0821ff3a 100644 --- a/src/uu/cut/src/searcher.rs +++ b/src/uu/cut/src/searcher.rs @@ -1,11 +1,9 @@ -/* - * 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. #[derive(Clone)] pub struct Searcher<'a> { diff --git a/src/uu/date/Cargo.toml b/src/uu/date/Cargo.toml index ccf808c3a..8c462fb26 100644 --- a/src/uu/date/Cargo.toml +++ b/src/uu/date/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "date" +name = "uu_date" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "date ~ (uutils) display or set the current time" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/date" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_date" path = "src/date.rs" [dependencies] chrono = "0.4.4" clap = "2.32" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..a82bb06cb 100644 --- a/src/uu/date/src/date.rs +++ b/src/uu/date/src/date.rs @@ -1,14 +1,13 @@ -#![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. - */ +// spell-checker:ignore (format) MMDDhhmm +// spell-checker:ignore (ToDO) DATEFILE 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..4144adb41 100644 --- a/src/uu/df/Cargo.toml +++ b/src/uu/df/Cargo.toml @@ -1,24 +1,29 @@ [package] -name = "df" +name = "uu_df" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "df ~ (uutils) display file system information" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/df" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [target.'cfg(target_os = "windows")'.dependencies] -kernel32-sys = "0.2" -winapi = { version = "0.3", features = ["handleapi", "winerror"] } +winapi = { version = "0.3", features = ["errhandlingapi", "fileapi", "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..95ee21f2f 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -1,14 +1,13 @@ -#![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. - */ +// spell-checker:ignore (ToDO) mountinfo mtab BLOCKSIZE getmntinfo fobj mptr noatime Iused overmounted +// spell-checker:ignore (libc/fs) asyncreads asyncwrites autofs bavail bfree bsize charspare cifs debugfs devfs devpts ffree frsize fsid fstypename fusectl inode inodes iosize kernfs mntbufp mntfromname mntonname mqueue namemax pipefs smbfs statfs statvfs subfs syncreads syncwrites sysfs wcslen extern crate clap; extern crate libc; @@ -17,16 +16,16 @@ extern crate number_prefix; #[macro_use] extern crate uucore; -#[cfg(windows)] -extern crate kernel32; +use clap::{App, Arg}; + #[cfg(windows)] extern crate winapi; - -use clap::{App, Arg}; #[cfg(windows)] -use kernel32::{ - FindFirstVolumeW, FindNextVolumeW, FindVolumeClose, GetDriveTypeW, GetLastError, - GetVolumeInformationW, GetVolumePathNamesForVolumeNameW, QueryDosDeviceW, +use winapi::um::errhandlingapi::GetLastError; +#[cfg(windows)] +use winapi::um::fileapi::{ + FindFirstVolumeW, FindNextVolumeW, FindVolumeClose, GetDriveTypeW, GetVolumeInformationW, + GetVolumePathNamesForVolumeNameW, QueryDosDeviceW, }; use number_prefix::{binary_prefix, decimal_prefix, PrefixNames, Prefixed, Standalone}; 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..a1bb6010e 100644 --- a/src/uu/dircolors/Cargo.toml +++ b/src/uu/dircolors/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "dircolors" +name = "uu_dircolors" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "dircolors ~ (uutils) display commands to set LS_COLORS" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/dircolors" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_dircolors" path = "src/dircolors.rs" [dependencies] glob = "0.3.0" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/colors.rs b/src/uu/dircolors/src/colors.rs index e9cea624f..e313078ab 100644 --- a/src/uu/dircolors/src/colors.rs +++ b/src/uu/dircolors/src/colors.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) EIGHTBIT ETERM MULTIHARDLINK cpio dtterm jfbterm konsole kterm mlterm rmvb rxvt stat'able svgz tmux webm xspf + pub const INTERNAL_DB: &str = r#"# Configuration file for dircolors, a utility to help you set the # LS_COLORS environment variable used by GNU ls with the --color option. # Copyright (C) 1996-2016 Free Software Foundation, Inc. diff --git a/src/uu/dircolors/src/dircolors.rs b/src/uu/dircolors/src/dircolors.rs index 2a485e1da..c88a1aa24 100644 --- a/src/uu/dircolors/src/dircolors.rs +++ b/src/uu/dircolors/src/dircolors.rs @@ -1,12 +1,11 @@ -#![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. -// + +// spell-checker:ignore (ToDO) clrtoeol dircolors eightbit endcode fnmatch leftcode multihardlink rightcode setenv sgid suid extern crate glob; @@ -27,7 +26,7 @@ static LONG_HELP: &str = " "; mod colors; -use colors::INTERNAL_DB; +use self::colors::INTERNAL_DB; #[derive(PartialEq, Debug)] pub enum OutputFmt { @@ -56,7 +55,7 @@ pub fn guess_syntax() -> OutputFmt { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag("b", "sh", "output Bourne shell code to set LS_COLORS") .optflag( "", @@ -74,7 +73,7 @@ pub fn uumain(args: Vec) -> i32 { || matches.opt_present("bourne-shell")) && matches.opt_present("print-database") { - disp_err!( + show_usage_error!( "the options to output dircolors' internal database and\nto select a shell \ syntax are mutually exclusive" ); @@ -83,7 +82,7 @@ pub fn uumain(args: Vec) -> i32 { if matches.opt_present("print-database") { if !matches.free.is_empty() { - disp_err!( + show_usage_error!( "extra operand ‘{}’\nfile operands cannot be combined with \ --print-database (-p)", matches.free[0] @@ -116,7 +115,7 @@ pub fn uumain(args: Vec) -> i32 { result = parse(INTERNAL_DB.lines(), out_format, "") } else { if matches.free.len() > 1 { - disp_err!("extra operand ‘{}’", matches.free[1]); + show_usage_error!("extra operand ‘{}’", matches.free[1]); return 1; } match File::open(matches.free[0].as_str()) { 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..847666854 100644 --- a/src/uu/dirname/Cargo.toml +++ b/src/uu/dirname/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "dirname" +name = "uu_dirname" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "dirname ~ (uutils) display parent directory of PATHNAME" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/dirname" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_dirname" path = "src/dirname.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..987708adc 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; @@ -24,7 +20,7 @@ static LONG_HELP: &str = " "; pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag("z", "zero", "separate output with NUL rather than newline") .parse(args); 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..6f14a6a32 100644 --- a/src/uu/du/Cargo.toml +++ b/src/uu/du/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "du" +name = "uu_du" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "du ~ (uutils) display disk usage" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/du" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_du" path = "src/du.rs" [dependencies] time = "0.1.40" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..51fb5dd2c 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) BLOCKSIZE inode inodes ment strs extern crate time; @@ -233,7 +231,7 @@ pub fn uumain(args: Vec) -> i32 { {0} [OPTION]... --files0-from=F", NAME ); - let matches = new_coreopts!(&syntax, SUMMARY, LONG_HELP) + let matches = app!(&syntax, SUMMARY, LONG_HELP) // In task .optflag( "a", 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..984f872e8 100644 --- a/src/uu/echo/Cargo.toml +++ b/src/uu/echo/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "echo" +name = "uu_echo" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "echo ~ (uutils) display TEXT" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/echo" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_echo" path = "src/echo.rs" [dependencies] -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..94013393f 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; @@ -107,7 +103,7 @@ fn print_escaped(input: &str, mut output: impl Write) -> io::Result { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, HELP) + let matches = app!(SYNTAX, SUMMARY, HELP) .optflag("n", "", "do not output the trailing newline") .optflag("e", "", "enable interpretation of backslash escapes") .optflag( 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..de54617f4 100644 --- a/src/uu/env/Cargo.toml +++ b/src/uu/env/Cargo.toml @@ -1,22 +1,26 @@ [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" +description = "env ~ (uutils) set each NAME to VALUE in the environment and run COMMAND" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/env" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] 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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..741348019 100644 --- a/src/uu/env/src/env.rs +++ b/src/uu/env/src/env.rs @@ -1,15 +1,14 @@ -#![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 */ +// spell-checker:ignore (ToDO) execvp progname subcommand subcommands unsets + #[macro_use] extern crate clap; 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..4be65e5f4 100644 --- a/src/uu/expand/Cargo.toml +++ b/src/uu/expand/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "expand" +name = "uu_expand" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "expand ~ (uutils) convert input tabs to spaces" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/expand" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..7ad5db4b0 100644 --- a/src/uu/expand/src/expand.rs +++ b/src/uu/expand/src/expand.rs @@ -1,15 +1,13 @@ -#![crate_name = "uu_expand"] +// 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. -/* - * 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. - */ +// spell-checker:ignore (ToDO) ctype cwidth iflag nbytes nspaces nums tspaces uflag extern crate getopts; extern crate unicode_width; @@ -103,7 +101,7 @@ impl Options { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag("i", "initial", "do not convert tabs after non blanks") .optopt( "t", 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..69f350cfd 100644 --- a/src/uu/expr/Cargo.toml +++ b/src/uu/expr/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "expr" +name = "uu_expr" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "expr ~ (uutils) display the value of EXPRESSION" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/expr" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..d56bab4fc 100644 --- a/src/uu/expr/src/syntax_tree.rs +++ b/src/uu/expr/src/syntax_tree.rs @@ -1,19 +1,20 @@ -/* - * 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. +//! Here we employ shunting-yard algorithm for building AST from tokens according to operators' precedence and associative-ness. //! * https://en.wikipedia.org/wiki/Shunting-yard_algorithm //! +// spell-checker:ignore (ToDO) binop binops ints paren prec + use onig::{Regex, RegexOptions, Syntax}; -use tokens::Token; + +use crate::tokens::Token; type TokenStack = Vec<(usize, Token)>; pub type OperandsList = Vec>; @@ -200,7 +201,10 @@ pub fn tokens_to_ast( maybe_dump_rpn(&out_stack); let result = ast_from_rpn(&mut out_stack); if !out_stack.is_empty() { - Err("syntax error (fist RPN token does not represent expression AST's root)".to_owned()) + Err( + "syntax error (first RPN token does not represent the root of the expression AST)" + .to_owned(), + ) } else { maybe_dump_ast(&result); result diff --git a/src/uu/expr/src/tokens.rs b/src/uu/expr/src/tokens.rs index 5ea6e17ee..558dae090 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: @@ -18,6 +16,8 @@ //! Hence all we need is to map the strings into the Token structures, except for some ugly fiddling with +-escaping. //! +// spell-checker:ignore (ToDO) paren + #[derive(Debug, Clone)] pub enum Token { Value { diff --git a/src/uu/factor/Cargo.toml b/src/uu/factor/Cargo.toml index 8f61ced4a..7589fe1bb 100644 --- a/src/uu/factor/Cargo.toml +++ b/src/uu/factor/Cargo.toml @@ -1,17 +1,24 @@ [package] -name = "factor" +name = "uu_factor" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" +description = "factor ~ (uutils) display the prime factors of each NUMBER" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_factor" path = "src/factor.rs" [dependencies] rand = "0.5" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..77fa3851a 100644 --- a/src/uu/factor/build.rs +++ b/src/uu/factor/build.rs @@ -1,23 +1,22 @@ -/* -* 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). -//! You can supply a commandline argument to override the default +//! You can supply a command line argument to override the default //! value of 1027 for the number of entries in the table. //! //! 2 has no multiplicative inverse mode 2^64 because 2 | 2^64, //! and in any case divisibility by two is trivial by checking the LSB. +// spell-checker:ignore (ToDO) invs newr newrp newtp outstr + #![cfg_attr(test, allow(dead_code))] -use sieve::Sieve; use std::env::{self, args}; use std::fs::File; use std::io::Write; @@ -25,6 +24,8 @@ use std::num::Wrapping; use std::path::Path; use std::u64::MAX as MAX_U64; +use self::sieve::Sieve; + #[cfg(test)] use miller_rabin::is_prime; @@ -34,9 +35,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 +72,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..c10321a7f 100644 --- a/src/uu/factor/sieve.rs +++ b/src/uu/factor/sieve.rs @@ -1,11 +1,11 @@ -/* -* 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. + +// spell-checker:ignore (ToDO) filts, minidx, minkey paridx 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..2fcf66ad4 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; @@ -120,7 +116,7 @@ fn print_factors_str(num_str: &str) { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP).parse(args); + let matches = app!(SYNTAX, SUMMARY, LONG_HELP).parse(args); if matches.free.is_empty() { let stdin = stdin(); 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/miller_rabin.rs b/src/uu/factor/src/miller_rabin.rs index f8ad493dd..63ef70d02 100644 --- a/src/uu/factor/src/miller_rabin.rs +++ b/src/uu/factor/src/miller_rabin.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (URL) appspot + use crate::numeric::*; // Small set of bases for the Miller-Rabin prime test, valid for all 64b integers; 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/factor/src/rho.rs b/src/uu/factor/src/rho.rs index e864519c9..6caded033 100644 --- a/src/uu/factor/src/rho.rs +++ b/src/uu/factor/src/rho.rs @@ -1,11 +1,12 @@ -use crate::miller_rabin::Result::*; -use crate::{miller_rabin, Factors}; -use numeric::*; use rand::distributions::{Distribution, Uniform}; use rand::rngs::SmallRng; use rand::{thread_rng, SeedableRng}; use std::cmp::{max, min}; +use crate::miller_rabin::Result::*; +use crate::numeric::*; +use crate::{miller_rabin, Factors}; + fn find_divisor(n: u64) -> u64 { #![allow(clippy::many_single_char_names)] let mut rand = { diff --git a/src/uu/factor/src/table.rs b/src/uu/factor/src/table.rs index 3a4f44e85..f62b7c63a 100644 --- a/src/uu/factor/src/table.rs +++ b/src/uu/factor/src/table.rs @@ -1,6 +1,9 @@ -use crate::Factors; +// spell-checker: ignore (ToDO) INVS + use std::num::Wrapping; +use crate::Factors; + include!(concat!(env!("OUT_DIR"), "/prime_table.rs")); pub(crate) fn factor(mut num: u64) -> (Factors, u64) { diff --git a/src/uu/false/Cargo.toml b/src/uu/false/Cargo.toml index 8f0af3062..784a44666 100644 --- a/src/uu/false/Cargo.toml +++ b/src/uu/false/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "false" +name = "uu_false" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "false ~ (uutils) do nothing and fail" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/false" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_false" path = "src/false.rs" [dependencies] -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..59bb0e2b7 100644 --- a/src/uu/fmt/Cargo.toml +++ b/src/uu/fmt/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "fmt" +name = "uu_fmt" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "fmt ~ (uutils) reformat each paragraph of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/fmt" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..0797ce30d 100644 --- a/src/uu/fmt/src/fmt.rs +++ b/src/uu/fmt/src/fmt.rs @@ -1,26 +1,25 @@ -#![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. - */ +// spell-checker:ignore (ToDO) PSKIP linebreak ostream parasplit tabwidth xanti xprefix extern crate unicode_width; #[macro_use] extern crate uucore; -use linebreak::break_lines; -use parasplit::ParagraphStream; use std::cmp; use std::fs::File; use std::io::{stdin, stdout, Write}; use std::io::{BufReader, BufWriter, Read}; +use self::linebreak::break_lines; +use self::parasplit::ParagraphStream; + macro_rules! silent_unwrap( ($exp:expr) => ( match $exp { @@ -59,7 +58,7 @@ pub struct FmtOptions { #[allow(clippy::cognitive_complexity)] pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag("c", "crown-margin", "First and second line of paragraph may have different indentations, in which case the first line's indentation is preserved, and each subsequent line's indentation matches the second line.") .optflag("t", "tagged-paragraph", "Like -c, except that the first and second line of a paragraph *must* have different indentation or they are treated as separate paragraphs.") .optflag("m", "preserve-headers", "Attempt to detect and preserve mail headers in the input. Be careful when combining this flag with -p.") diff --git a/src/uu/fmt/src/linebreak.rs b/src/uu/fmt/src/linebreak.rs index 7f1097cdc..c41fd41bd 100644 --- a/src/uu/fmt/src/linebreak.rs +++ b/src/uu/fmt/src/linebreak.rs @@ -1,18 +1,19 @@ -/* - * 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. + +// spell-checker:ignore (ToDO) INFTY MULT accum breakwords linebreak linebreaking linebreaks linelen maxlength minlength nchars ostream overlen parasplit plass posn powf punct signum slen sstart tabwidth tlen underlen winfo wlen wordlen -use parasplit::{ParaWords, Paragraph, WordInfo}; use std::cmp; use std::i64; use std::io::{BufWriter, Stdout, Write}; use std::mem; -use FmtOptions; + +use crate::parasplit::{ParaWords, Paragraph, WordInfo}; +use crate::FmtOptions; struct BreakArgs<'a> { opts: &'a FmtOptions, 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..ddf6f394b 100644 --- a/src/uu/fmt/src/parasplit.rs +++ b/src/uu/fmt/src/parasplit.rs @@ -1,18 +1,19 @@ -/* - * 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. + +// spell-checker:ignore (ToDO) INFTY MULT PSKIP accum aftertab beforetab breakwords fmt's formatline linebreak linebreaking linebreaks linelen maxlength minlength nchars noformat noformatline ostream overlen parasplit pfxind plass pmatch poffset posn powf prefixindent punct signum slen sstart tabwidth tlen underlen winfo wlen wordlen wordsplits xanti xprefix use std::io::{BufRead, Lines}; use std::iter::Peekable; use std::slice::Iter; use unicode_width::UnicodeWidthChar; -use FileOrStdReader; -use FmtOptions; + +use crate::FileOrStdReader; +use crate::FmtOptions; fn char_width(c: char) -> usize { if (c as usize) < 0xA0 { diff --git a/src/uu/fold/Cargo.toml b/src/uu/fold/Cargo.toml index 155d5b7b2..10493a9ca 100644 --- a/src/uu/fold/Cargo.toml +++ b/src/uu/fold/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "fold" +name = "uu_fold" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "fold ~ (uutils) wrap each line of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/fold" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_fold" path = "src/fold.rs" [dependencies] -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..066c05de1 100644 --- a/src/uu/fold/src/fold.rs +++ b/src/uu/fold/src/fold.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDOs) ncount routput #[macro_use] extern crate uucore; @@ -23,7 +21,7 @@ static LONG_HELP: &str = ""; pub fn uumain(args: Vec) -> i32 { let (args, obs_width) = handle_obsolete(&args[..]); - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optflag( "b", "bytes", 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..20cc8cc21 100644 --- a/src/uu/groups/Cargo.toml +++ b/src/uu/groups/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "groups" +name = "uu_groups" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "groups ~ (uutils) display group memberships for USERNAME" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/groups" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_groups" path = "src/groups.rs" [dependencies] -uucore = { version = "0.0.2", features = ["entries"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries"] } +uucore_procs = { version="0.0.4", 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..93e973c44 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,8 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// -// + +// spell-checker:ignore (ToDO) passwd #[macro_use] extern crate uucore; @@ -18,7 +16,7 @@ static SYNTAX: &str = "[user]"; static SUMMARY: &str = "display current group names"; pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, "").parse(args); + let matches = app!(SYNTAX, SUMMARY, "").parse(args); if matches.free.is_empty() { println!( 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..3888b7a22 100644 --- a/src/uu/hashsum/Cargo.toml +++ b/src/uu/hashsum/Cargo.toml @@ -1,12 +1,17 @@ [package] -name = "hashsum" +name = "uu_hashsum" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "hashsum ~ (uutils) display or check input digests" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/hashsum" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_hashsum" path = "src/hashsum.rs" [dependencies] @@ -20,8 +25,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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/digest.rs b/src/uu/hashsum/src/digest.rs index 498d01a2d..ea2953dfd 100644 --- a/src/uu/hashsum/src/digest.rs +++ b/src/uu/hashsum/src/digest.rs @@ -4,9 +4,10 @@ extern crate sha1; extern crate sha2; extern crate sha3; -use digest::digest::{ExtendableOutput, Input, XofReader}; use hex::ToHex; +use crate::digest::digest::{ExtendableOutput, Input, XofReader}; + pub trait Digest { fn new() -> Self where diff --git a/src/uu/hashsum/src/hashsum.rs b/src/uu/hashsum/src/hashsum.rs index 259f6eb2e..9f59ed4a4 100644 --- a/src/uu/hashsum/src/hashsum.rs +++ b/src/uu/hashsum/src/hashsum.rs @@ -1,15 +1,13 @@ -#![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. - */ +// spell-checker:ignore (ToDO) algo, algoname, regexes, nread extern crate getopts; extern crate hex; @@ -25,7 +23,8 @@ extern crate uucore; mod digest; -use digest::Digest; +use self::digest::Digest; + use hex::ToHex; use md5::Context as Md5; use regex::Regex; 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..df9f10a72 100644 --- a/src/uu/head/Cargo.toml +++ b/src/uu/head/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "head" +name = "uu_head" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "head ~ (uutils) display the first lines of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/head" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_head" path = "src/head.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..e05f0d448 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; @@ -56,7 +52,7 @@ pub fn uumain(args: Vec) -> i32 { (args, None) => args, }; - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optopt( "c", "bytes", @@ -135,16 +131,16 @@ pub fn uumain(args: Vec) -> i32 { let mut buffer = BufReader::new(stdin()); head(&mut buffer, &settings); } else { - let mut firstime = true; + let mut first_time = true; for file in &files { if settings.verbose { - if !firstime { + if !first_time { println!(); } println!("==> {} <==", file); } - firstime = false; + first_time = false; let path = Path::new(file); let reader = File::open(&path).unwrap(); 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..db833ace7 100644 --- a/src/uu/hostid/Cargo.toml +++ b/src/uu/hostid/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "hostid" +name = "uu_hostid" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "hostid ~ (uutils) display the numeric identifier of the current host" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/hostid" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_hostid" path = "src/hostid.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..d357e6d8a 100644 --- a/src/uu/hostid/src/hostid.rs +++ b/src/uu/hostid/src/hostid.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) gethostid extern crate libc; @@ -26,7 +24,7 @@ extern "C" { } pub fn uumain(args: Vec) -> i32 { - new_coreopts!(SYNTAX, SUMMARY, LONG_HELP).parse(args); + app!(SYNTAX, SUMMARY, LONG_HELP).parse(args); hostid(); 0 } 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..c0b724acd 100644 --- a/src/uu/hostname/Cargo.toml +++ b/src/uu/hostname/Cargo.toml @@ -1,21 +1,27 @@ [package] -name = "hostname" +name = "uu_hostname" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "hostname ~ (uutils) display or set the host name of the current host" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/hostname" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["wide"] } +uucore_procs = { version="0.0.4", 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..99eadaa17 100644 --- a/src/uu/hostname/src/hostname.rs +++ b/src/uu/hostname/src/hostname.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) MAKEWORD addrs hashset 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..f82a76c44 100644 --- a/src/uu/id/Cargo.toml +++ b/src/uu/id/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "id" +name = "uu_id" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "id ~ (uutils) display user and group information for USER" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/id" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_id" path = "src/id.rs" [dependencies] -uucore = { version = "0.0.2", features = ["entries", "process"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "process"] } +uucore_procs = { version="0.0.4", 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..97fa517f2 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,9 @@ // 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 -// + +// spell-checker:ignore (ToDO) asid auditid auditinfo auid cstr egid emod euid getaudit getlogin gflag nflag pline rflag termid uflag + #![allow(non_camel_case_types)] #![allow(dead_code)] @@ -71,7 +72,7 @@ static SYNTAX: &str = "[OPTION]... [USER]"; static SUMMARY: &str = "Print user and group information for the specified USER,\n or (when USER omitted) for the current user."; pub fn uumain(args: Vec) -> i32 { - let mut opts = new_coreopts!(SYNTAX, SUMMARY, ""); + let mut opts = app!(SYNTAX, SUMMARY, ""); opts.optflag( "A", "", 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..3e00a9bd8 100644 --- a/src/uu/install/Cargo.toml +++ b/src/uu/install/Cargo.toml @@ -1,22 +1,31 @@ [package] -name = "install" +name = "uu_install" version = "0.0.1" -authors = ["Ben Eills "] +authors = [ + "Ben Eills ", + "uutils developers", +] license = "MIT" -build = "../../common/mkmain.rs" +description = "install ~ (uutils) copy files from SOURCE to DESTINATION (with specified attributes)" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/install" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_install" path = "src/install.rs" [dependencies] getopts = "0.2.18" libc = ">= 0.2" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["mode"] } +uucore_procs = { version="0.0.4", 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..c3e13e52a 100644 --- a/src/uu/install/src/install.rs +++ b/src/uu/install/src/install.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) rwxr sourcepath targetpath extern crate getopts; extern crate libc; @@ -29,7 +27,7 @@ static LONG_HELP: &str = ""; const DEFAULT_MODE: u32 = 755; #[allow(dead_code)] -pub struct Behaviour { +pub struct Behavior { main_function: MainFunction, specified_mode: Option, suffix: String, @@ -44,7 +42,7 @@ pub enum MainFunction { Standard, } -impl Behaviour { +impl Behavior { /// Determine the mode for chmod after copy. pub fn mode(&self) -> u32 { match self.specified_mode { @@ -66,7 +64,7 @@ pub fn uumain(args: Vec) -> i32 { return 2; } - let behaviour = match behaviour(&matches) { + let behavior = match behavior(&matches) { Ok(x) => x, Err(ret) => { return ret; @@ -84,9 +82,9 @@ pub fn uumain(args: Vec) -> i32 { arguments.map(to_owned).collect() }; - match behaviour.main_function { - MainFunction::Directory => directory(&paths[..], behaviour), - MainFunction::Standard => standard(&paths[..], behaviour), + match behavior.main_function { + MainFunction::Directory => directory(&paths[..], behavior), + MainFunction::Standard => standard(&paths[..], behavior), } } @@ -100,7 +98,7 @@ fn parse_opts(args: Vec) -> getopts::Matches { {} SOURCE... DIRECTORY", NAME ); - new_coreopts!(&syntax, SUMMARY, LONG_HELP) + app!(&syntax, SUMMARY, LONG_HELP) // TODO implement flag .optflagopt( "", @@ -140,7 +138,7 @@ fn parse_opts(args: Vec) -> getopts::Matches { .optflagopt( "g", "group", - "(unimplemented) set group ownership, instead of process'\n \ + "(unimplemented) set group ownership, instead of process's\n \ current group", "GROUP", ) @@ -255,15 +253,15 @@ fn check_unimplemented(matches: &getopts::Matches) -> Result<(), &str> { } } -/// Determine behaviour, given command line arguments. +/// Determine behavior, given command line arguments. /// -/// If successful, returns a filled-out Behaviour struct. +/// If successful, returns a filled-out Behavior struct. /// /// # Errors /// /// In event of failure, returns an integer intended as a program return code. /// -fn behaviour(matches: &getopts::Matches) -> Result { +fn behavior(matches: &getopts::Matches) -> Result { let main_function = if matches.opt_present("directory") { MainFunction::Directory } else { @@ -310,7 +308,7 @@ fn behaviour(matches: &getopts::Matches) -> Result { "~".to_owned() }; - Ok(Behaviour { + Ok(Behavior { main_function, specified_mode, suffix: backup_suffix, @@ -325,7 +323,7 @@ fn behaviour(matches: &getopts::Matches) -> Result { /// /// Returns an integer intended as a program return code. /// -fn directory(paths: &[PathBuf], b: Behaviour) -> i32 { +fn directory(paths: &[PathBuf], b: Behavior) -> i32 { if paths.is_empty() { println!("{} with -d requires at least one argument.", NAME); 1 @@ -367,11 +365,11 @@ fn is_new_file_path(path: &Path) -> bool { path.is_file() || !path.exists() && path.parent().map(Path::is_dir).unwrap_or(true) } -/// Perform an install, given a list of paths and behaviour. +/// Perform an install, given a list of paths and behavior. /// /// Returns an integer intended as a program return code. /// -fn standard(paths: &[PathBuf], b: Behaviour) -> i32 { +fn standard(paths: &[PathBuf], b: Behavior) -> i32 { if paths.len() < 2 { println!("{} requires at least 2 arguments.", NAME); 1 @@ -397,7 +395,7 @@ fn standard(paths: &[PathBuf], b: Behaviour) -> i32 { /// _files_ must all exist as non-directories. /// _target_dir_ must be a directory. /// -fn copy_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) -> i32 { +fn copy_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behavior) -> i32 { if !target_dir.is_dir() { show_error!("target ‘{}’ is not a directory", target_dir.display()); return 1; @@ -439,7 +437,7 @@ fn copy_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) - /// _file_ must exist as a non-directory. /// _target_ must be a non-directory /// -fn copy_file_to_file(file: &PathBuf, target: &PathBuf, b: &Behaviour) -> i32 { +fn copy_file_to_file(file: &PathBuf, target: &PathBuf, b: &Behavior) -> i32 { if copy(file, &target, b).is_err() { 1 } else { @@ -458,7 +456,7 @@ fn copy_file_to_file(file: &PathBuf, target: &PathBuf, b: &Behaviour) -> i32 { /// /// If the copy system call fails, we print a verbose error and return an empty error value. /// -fn copy(from: &PathBuf, to: &PathBuf, b: &Behaviour) -> Result<(), ()> { +fn copy(from: &PathBuf, to: &PathBuf, b: &Behavior) -> Result<(), ()> { let io_result = fs::copy(from, to); if let Err(err) = io_result { 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/install/src/mode.rs b/src/uu/install/src/mode.rs index 06f458dc7..9c8eb2de0 100644 --- a/src/uu/install/src/mode.rs +++ b/src/uu/install/src/mode.rs @@ -9,7 +9,7 @@ use uucore::mode; pub fn parse(mode_string: &str, considering_dir: bool) -> Result { let numbers: &[char] = &['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; - // Passing 000 as the existing permissions seems to mirror GNU behaviour. + // Passing 000 as the existing permissions seems to mirror GNU behavior. if mode_string.contains(numbers) { mode::parse_numeric(0, mode_string) } else { diff --git a/src/uu/join/Cargo.toml b/src/uu/join/Cargo.toml index 5d3653a3b..156b4429b 100644 --- a/src/uu/join/Cargo.toml +++ b/src/uu/join/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "join" +name = "uu_join" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "join ~ (uutils) merge lines from inputs with matching join fields" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/join" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_join" path = "src/join.rs" [dependencies] clap = "2.32" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..5d0e0e561 100644 --- a/src/uu/join/src/join.rs +++ b/src/uu/join/src/join.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) autoformat FILENUM whitespaces pairable unpairable nocheck 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..1562ffb8a 100644 --- a/src/uu/kill/Cargo.toml +++ b/src/uu/kill/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "kill" +name = "uu_kill" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "kill ~ (uutils) send a signal to a process" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/kill" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_kill" path = "src/kill.rs" [dependencies] libc = "0.2.42" -uucore = { version = "0.0.2", features = ["signals"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["signals"] } +uucore_procs = { version="0.0.4", 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..9ce4b3c11 100644 --- a/src/uu/kill/src/kill.rs +++ b/src/uu/kill/src/kill.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) signalname pids extern crate libc; @@ -34,7 +32,7 @@ pub enum Mode { pub fn uumain(args: Vec) -> i32 { let (args, obs_signal) = handle_obsolete(args); - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP) + let matches = app!(SYNTAX, SUMMARY, LONG_HELP) .optopt("s", "signal", "specify the to be sent", "SIGNAL") .optflagopt( "l", 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..9b9f08f94 100644 --- a/src/uu/link/Cargo.toml +++ b/src/uu/link/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "link" +name = "uu_link" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "link ~ (uutils) create a hard (file system) link to FILE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/link" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_link" path = "src/link.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..23de5e3b4 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; @@ -28,7 +24,7 @@ pub fn normalize_error_message(e: Error) -> String { } pub fn uumain(args: Vec) -> i32 { - let matches = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP).parse(args); + let matches = app!(SYNTAX, SUMMARY, LONG_HELP).parse(args); if matches.free.len() != 2 { crash!(1, "{}", msg_wrong_number_of_arguments!(2)); } 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..2a26ca938 100644 --- a/src/uu/ln/Cargo.toml +++ b/src/uu/ln/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "ln" +name = "uu_ln" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "ln ~ (uutils) create a (file system) link to TARGET" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/ln" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_ln" path = "src/ln.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..a00052950 100644 --- a/src/uu/ln/src/ln.rs +++ b/src/uu/ln/src/ln.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) srcpath targetpath EEXIST #[macro_use] extern crate uucore; @@ -66,7 +64,7 @@ pub fn uumain(args: Vec) -> i32 { {0} [OPTION]... -t DIRECTORY TARGET... (4th form)", NAME ); - let matches = new_coreopts!(&syntax, SUMMARY, LONG_HELP) + let matches = app!(&syntax, SUMMARY, LONG_HELP) .optflag( "b", "", 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..450ac4571 100644 --- a/src/uu/logname/Cargo.toml +++ b/src/uu/logname/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "logname" +name = "uu_logname" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "logname ~ (uutils) display the login name of the current user" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/logname" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_logname" path = "src/logname.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..bbe2dddae 100644 --- a/src/uu/logname/src/logname.rs +++ b/src/uu/logname/src/logname.rs @@ -1,16 +1,14 @@ -#![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 */ +// spell-checker:ignore (ToDO) getlogin userlogin + extern crate libc; #[macro_use] @@ -39,7 +37,7 @@ static SUMMARY: &str = "Print user's login name"; static LONG_HELP: &str = ""; pub fn uumain(args: Vec) -> i32 { - new_coreopts!(SYNTAX, SUMMARY, LONG_HELP).parse(args); + app!(SYNTAX, SUMMARY, LONG_HELP).parse(args); exec(); 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..f35f90dc1 100644 --- a/src/uu/ls/Cargo.toml +++ b/src/uu/ls/Cargo.toml @@ -1,12 +1,17 @@ [package] -name = "ls" +name = "uu_ls" version = "0.0.1" -authors = ["Jeremiah Peschka "] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "ls ~ (uutils) display directory contents" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/ls" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_ls" path = "src/ls.rs" [dependencies] @@ -18,8 +23,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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "fs"] } +uucore_procs = { version="0.0.4", 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..5d946dd8d 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -1,12 +1,11 @@ -#![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. -// + +// spell-checker:ignore (ToDO) cpio svgz webm somegroup nlink rmvb xspf extern crate getopts; #[cfg(unix)] @@ -83,7 +82,7 @@ pub fn uumain(args: Vec) -> i32 { {0} [OPTION]... [FILE]...", NAME ); - let matches = new_coreopts!(&syntax, SUMMARY, LONG_HELP) + let matches = app!(&syntax, SUMMARY, LONG_HELP) .optflag("1", "", "list one file per line.") .optflag( "a", 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..89c391fb0 100644 --- a/src/uu/mkdir/Cargo.toml +++ b/src/uu/mkdir/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "mkdir" +name = "uu_mkdir" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "mkdir ~ (uutils) create DIRECTORY" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/mkdir" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs", "mode"] } +uucore_procs = { version="0.0.4", 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..9a01b1202 100644 --- a/src/uu/mkdir/src/mkdir.rs +++ b/src/uu/mkdir/src/mkdir.rs @@ -1,16 +1,11 @@ -#![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; #[macro_use] extern crate uucore; @@ -128,7 +123,7 @@ fn mkdir(path: &Path, recursive: bool, mode: u16, verbose: bool) -> i32 { #[cfg(any(unix, target_os = "redox"))] fn chmod(path: &Path, mode: u16) -> i32 { - use fs::{set_permissions, Permissions}; + use std::fs::{set_permissions, Permissions}; use std::os::unix::fs::PermissionsExt; let mode = Permissions::from_mode(u32::from(mode)); diff --git a/src/uu/mkfifo/Cargo.toml b/src/uu/mkfifo/Cargo.toml index 25e07fa28..c06be0dad 100644 --- a/src/uu/mkfifo/Cargo.toml +++ b/src/uu/mkfifo/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "mkfifo" +name = "uu_mkfifo" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "mkfifo ~ (uutils) create FIFOs (named pipes)" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/mkfifo" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..d7058b883 100644 --- a/src/uu/mknod/Cargo.toml +++ b/src/uu/mknod/Cargo.toml @@ -1,9 +1,15 @@ [package] -name = "mknod" +name = "uu_mknod" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "mknod ~ (uutils) create special file NAME of TYPE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/mknod" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] name = "uu_mknod" @@ -12,8 +18,9 @@ path = "src/mknod.rs" [dependencies] getopts = "0.2.18" libc = "^0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["mode"] } +uucore_procs = { version="0.0.4", 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..9e4eb161c 100644 --- a/src/uu/mknod/src/mknod.rs +++ b/src/uu/mknod/src/mknod.rs @@ -1,12 +1,11 @@ -#![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. -// + +// spell-checker:ignore (ToDO) parsemode makedev sysmacros makenod newmode perror IFBLK IFCHR IFIFO extern crate getopts; extern crate libc; @@ -120,8 +119,8 @@ for details about the options it supports.", let mut ret = 0i32; match matches.free.len() { - 0 => disp_err!("missing operand"), - 1 => disp_err!("missing operand after ‘{}’", matches.free[0]), + 0 => show_usage_error!("missing operand"), + 1 => show_usage_error!("missing operand after ‘{}’", matches.free[0]), _ => { let args = &matches.free; let c_str = CString::new(args[0].as_str()).expect("Failed to convert to CString"); @@ -153,10 +152,10 @@ for details about the options it supports.", eprintln!("Try '{} --help' for more information.", NAME); return 1; } else if args.len() > 4 { - disp_err!("extra operand ‘{}’", args[4]); + show_usage_error!("extra operand ‘{}’", args[4]); return 1; } else if !"bcu".contains(ch) { - disp_err!("invalid device type ‘{}’", args[1]); + show_usage_error!("invalid device type ‘{}’", args[1]); return 1; } diff --git a/src/uu/mknod/src/parsemode.rs b/src/uu/mknod/src/parsemode.rs index 688b3d5c7..e995d93b9 100644 --- a/src/uu/mknod/src/parsemode.rs +++ b/src/uu/mknod/src/parsemode.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) fperm + extern crate libc; use libc::{mode_t, S_IRGRP, S_IROTH, S_IRUSR, S_IWGRP, S_IWOTH, S_IWUSR}; diff --git a/src/uu/mktemp/Cargo.toml b/src/uu/mktemp/Cargo.toml index 8d49b3cac..9d0df8637 100644 --- a/src/uu/mktemp/Cargo.toml +++ b/src/uu/mktemp/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "mktemp" +name = "uu_mktemp" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "mktemp ~ (uutils) create and display a temporary file or directory from TEMPLATE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/mktemp" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..3ae9211ca 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,8 @@ // // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// + +// spell-checker:ignore (ToDO) tempfile tempdir SUFF TMPDIR tmpname extern crate getopts; extern crate rand; diff --git a/src/uu/mktemp/src/tempdir.rs b/src/uu/mktemp/src/tempdir.rs index 187ade269..10c0bb62a 100644 --- a/src/uu/mktemp/src/tempdir.rs +++ b/src/uu/mktemp/src/tempdir.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) tempdir tmpdir + // Mainly taken from crate `tempdir` extern crate rand; diff --git a/src/uu/more/Cargo.toml b/src/uu/more/Cargo.toml index 87125d6f7..56af9e2df 100644 --- a/src/uu/more/Cargo.toml +++ b/src/uu/more/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "more" +name = "uu_more" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "more ~ (uutils) input perusal filter" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/more" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_more" path = "src/more.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [target.'cfg(target_os = "redox")'.dependencies] redox_termios = "0.1" @@ -22,4 +28,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..18e69a836 100644 --- a/src/uu/more/src/more.rs +++ b/src/uu/more/src/more.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) lflag ICANON tcgetattr tcsetattr TCSADRAIN extern crate getopts; diff --git a/src/uu/mv/Cargo.toml b/src/uu/mv/Cargo.toml index 03afd1a0c..708330800 100644 --- a/src/uu/mv/Cargo.toml +++ b/src/uu/mv/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "mv" +name = "uu_mv" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "mv ~ (uutils) move (rename) SOURCE to DESTINATION" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/mv" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..42f4f3134 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,8 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// + +// spell-checker:ignore (ToDO) sourcepath targetpath extern crate fs_extra; extern crate getopts; @@ -29,7 +28,7 @@ use fs_extra::dir::{move_dir, CopyOptions as DirCopyOptions}; static NAME: &str = "mv"; static VERSION: &str = env!("CARGO_PKG_VERSION"); -pub struct Behaviour { +pub struct Behavior { overwrite: OverwriteMode, backup: BackupMode, suffix: String, @@ -120,7 +119,7 @@ pub fn uumain(args: Vec) -> i32 { return 1; } - let behaviour = Behaviour { + let behavior = Behavior { overwrite: overwrite_mode, backup: backup_mode, suffix: backup_suffix, @@ -150,7 +149,7 @@ pub fn uumain(args: Vec) -> i32 { help(&usage); 0 } else { - exec(&paths[..], behaviour) + exec(&paths[..], behavior) } } @@ -228,7 +227,7 @@ fn help(usage: &str) { ); } -fn exec(files: &[PathBuf], b: Behaviour) -> i32 { +fn exec(files: &[PathBuf], b: Behavior) -> i32 { if let Some(ref name) = b.target_dir { return move_files_into_dir(files, &PathBuf::from(name), &b); } @@ -312,7 +311,7 @@ fn exec(files: &[PathBuf], b: Behaviour) -> i32 { 0 } -fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) -> i32 { +fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behavior) -> i32 { if !target_dir.is_dir() { show_error!("target ‘{}’ is not a directory", target_dir.display()); return 1; @@ -350,7 +349,7 @@ fn move_files_into_dir(files: &[PathBuf], target_dir: &PathBuf, b: &Behaviour) - } } -fn rename(from: &PathBuf, to: &PathBuf, b: &Behaviour) -> io::Result<()> { +fn rename(from: &PathBuf, to: &PathBuf, b: &Behavior) -> io::Result<()> { let mut backup_path = None; if to.exists() { @@ -416,7 +415,7 @@ fn rename_with_fallback(from: &PathBuf, to: &PathBuf) -> io::Result<()> { rename_symlink_fallback(&from, &to)?; } else if file_type.is_dir() { // We remove the destination directory if it exists to match the - // behaviour of `fs::rename`. As far as I can tell, `fs_extra`'s + // behavior of `fs::rename`. As far as I can tell, `fs_extra`'s // `move_dir` would otherwise behave differently. if to.exists() { fs::remove_dir_all(to)?; diff --git a/src/uu/nice/Cargo.toml b/src/uu/nice/Cargo.toml index d09a7709f..e9ca8445a 100644 --- a/src/uu/nice/Cargo.toml +++ b/src/uu/nice/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "nice" +name = "uu_nice" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "nice ~ (uutils) run PROGRAM with modified scheduling priority" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/nice" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..16692dfdd 100644 --- a/src/uu/nice/src/nice.rs +++ b/src/uu/nice/src/nice.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) getpriority execvp setpriority nstr PRIO cstrs ENOENT extern crate getopts; extern crate libc; diff --git a/src/uu/nl/Cargo.toml b/src/uu/nl/Cargo.toml index 1f582aae5..23d12af1e 100644 --- a/src/uu/nl/Cargo.toml +++ b/src/uu/nl/Cargo.toml @@ -1,12 +1,17 @@ [package] -name = "nl" +name = "uu_nl" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "nl ~ (uutils) display input with added line numbers" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/nl" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_nl" path = "src/nl.rs" [dependencies] @@ -16,8 +21,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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/helper.rs b/src/uu/nl/src/helper.rs index b34c2a1e1..d3b78ea04 100644 --- a/src/uu/nl/src/helper.rs +++ b/src/uu/nl/src/helper.rs @@ -1,18 +1,20 @@ +// spell-checker:ignore (ToDO) conv + extern crate getopts; extern crate regex; // parse_style parses a style string into a NumberingStyle. -fn parse_style(chars: &[char]) -> Result<::NumberingStyle, String> { +fn parse_style(chars: &[char]) -> Result { if chars.len() == 1 && chars[0] == 'a' { - Ok(::NumberingStyle::NumberForAll) + Ok(crate::NumberingStyle::NumberForAll) } else if chars.len() == 1 && chars[0] == 't' { - Ok(::NumberingStyle::NumberForNonEmpty) + Ok(crate::NumberingStyle::NumberForNonEmpty) } else if chars.len() == 1 && chars[0] == 'n' { - Ok(::NumberingStyle::NumberForNone) + Ok(crate::NumberingStyle::NumberForNone) } else if chars.len() > 1 && chars[0] == 'p' { let s: String = chars[1..].iter().cloned().collect(); match regex::Regex::new(&s) { - Ok(re) => Ok(::NumberingStyle::NumberForRegularExpression(re)), + Ok(re) => Ok(crate::NumberingStyle::NumberForRegularExpression(re)), Err(_) => Err(String::from("Illegal regular expression")), } } else { @@ -22,7 +24,7 @@ fn parse_style(chars: &[char]) -> Result<::NumberingStyle, String> { // parse_options loads the options into the settings, returning an array of // error messages. -pub fn parse_options(settings: &mut ::Settings, opts: &getopts::Matches) -> Vec { +pub fn parse_options(settings: &mut crate::Settings, opts: &getopts::Matches) -> Vec { // This vector holds error messages encountered. let mut errs: Vec = vec![]; settings.renumber = !opts.opt_present("p"); @@ -36,13 +38,13 @@ pub fn parse_options(settings: &mut ::Settings, opts: &getopts::Matches) -> Vec< None => {} Some(val) => match val.as_ref() { "ln" => { - settings.number_format = ::NumberFormat::Left; + settings.number_format = crate::NumberFormat::Left; } "rn" => { - settings.number_format = ::NumberFormat::Right; + settings.number_format = crate::NumberFormat::Right; } "rz" => { - settings.number_format = ::NumberFormat::RightZero; + settings.number_format = crate::NumberFormat::RightZero; } _ => { errs.push(String::from("Illegal value for -n")); 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..14f710d5f 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -1,14 +1,12 @@ -#![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. - * - */ +// spell-checker:ignore (ToDO) corasick memchr extern crate aho_corasick; extern crate getopts; diff --git a/src/uu/nohup/Cargo.toml b/src/uu/nohup/Cargo.toml index 68afca8a0..d349fd22f 100644 --- a/src/uu/nohup/Cargo.toml +++ b/src/uu/nohup/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "nohup" +name = "uu_nohup" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "nohup ~ (uutils) run COMMAND, ignoring hangup signals" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/nohup" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..68d7e2a9a 100644 --- a/src/uu/nohup/src/nohup.rs +++ b/src/uu/nohup/src/nohup.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) execvp SIGHUP cproc vprocmgr cstrs homeout extern crate getopts; extern crate libc; diff --git a/src/uu/nproc/Cargo.toml b/src/uu/nproc/Cargo.toml index f80fb727c..54fae4506 100644 --- a/src/uu/nproc/Cargo.toml +++ b/src/uu/nproc/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "nproc" +name = "uu_nproc" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "nproc ~ (uutils) display the number of processing units available" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/nproc" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..28aee4b12 100644 --- a/src/uu/nproc/src/nproc.rs +++ b/src/uu/nproc/src/nproc.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) NPROCESSORS nprocs numstr threadstr sysconf extern crate getopts; extern crate num_cpus; diff --git a/src/uu/numfmt/Cargo.toml b/src/uu/numfmt/Cargo.toml index cd56f2dfc..b965b6053 100644 --- a/src/uu/numfmt/Cargo.toml +++ b/src/uu/numfmt/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "numfmt" +name = "uu_numfmt" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "numfmt ~ (uutils) reformat NUMBER" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/numfmt" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_numfmt" path = "src/numfmt.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..378720da4 100644 --- a/src/uu/od/Cargo.toml +++ b/src/uu/od/Cargo.toml @@ -1,21 +1,27 @@ [package] -name = "od" +name = "uu_od" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "od ~ (uutils) display formatted representation of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/od" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_od" path = "src/od.rs" [dependencies] byteorder = "1.3.2" getopts = "0.2.18" -half = "1.1.1" +half = { version="1.1.0, < 1.4.0", package="half" } ## half v1.4.0 has compiler errors for MinSRV v1.31.0 libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/byteorder_io.rs b/src/uu/od/src/byteorder_io.rs index 5d7ad4cab..c22097da2 100644 --- a/src/uu/od/src/byteorder_io.rs +++ b/src/uu/od/src/byteorder_io.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) byteorder + // workaround until https://github.com/BurntSushi/byteorder/issues/41 has been fixed // based on: https://github.com/netvl/immeta/blob/4460ee/src/utils.rs#L76 diff --git a/src/uu/od/src/formatteriteminfo.rs b/src/uu/od/src/formatteriteminfo.rs index 946106fc7..d44d97a92 100644 --- a/src/uu/od/src/formatteriteminfo.rs +++ b/src/uu/od/src/formatteriteminfo.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) formatteriteminfo + use std::fmt; #[derive(Copy)] @@ -16,7 +18,7 @@ impl Clone for FormatWriter { impl PartialEq for FormatWriter { fn eq(&self, other: &FormatWriter) -> bool { - use formatteriteminfo::FormatWriter::*; + use crate::formatteriteminfo::FormatWriter::*; match (self, other) { (&IntWriter(ref a), &IntWriter(ref b)) => a == b, diff --git a/src/uu/od/src/inputdecoder.rs b/src/uu/od/src/inputdecoder.rs index ea75ef237..0bc6113b9 100644 --- a/src/uu/od/src/inputdecoder.rs +++ b/src/uu/od/src/inputdecoder.rs @@ -1,9 +1,10 @@ -use byteorder_io::ByteOrder; use half::f16; -use multifilereader::HasError; -use peekreader::PeekRead; use std::io; +use crate::byteorder_io::ByteOrder; +use crate::multifilereader::HasError; +use crate::peekreader::PeekRead; + /// Processes an input and provides access to the data read in various formats /// /// Currently only useful if the input implements `PeekRead`. diff --git a/src/uu/od/src/inputoffset.rs b/src/uu/od/src/inputoffset.rs index 8f3030edf..2bdf03ca4 100644 --- a/src/uu/od/src/inputoffset.rs +++ b/src/uu/od/src/inputoffset.rs @@ -70,7 +70,7 @@ fn test_input_offset() { sut.increase_position(10); assert_eq!("000014", &sut.format_byte_offset()); - // note normally the radix will not change after initialisation + // note normally the radix will not change after initialization sut.set_radix(Radix::Decimal); assert_eq!("0000020", &sut.format_byte_offset()); @@ -95,7 +95,7 @@ fn test_input_offset_with_label() { sut.increase_position(10); assert_eq!("000014 (00001E)", &sut.format_byte_offset()); - // note normally the radix will not change after initialisation + // note normally the radix will not change after initialization sut.set_radix(Radix::Decimal); assert_eq!("0000020 (0000030)", &sut.format_byte_offset()); 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/multifilereader.rs b/src/uu/od/src/multifilereader.rs index e61ce8614..dae9ece03 100644 --- a/src/uu/od/src/multifilereader.rs +++ b/src/uu/od/src/multifilereader.rs @@ -1,4 +1,5 @@ -use std; +// spell-checker:ignore (ToDO) multifile curr fnames fname xfrd fillloop mockstream + use std::fs::File; use std::io; use std::io::BufReader; diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index c8982c630..e4e7b3a89 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) formatteriteminfo inputdecoder inputoffset mockstream nrofbytes partialreader odfunc multifile exitcode extern crate byteorder; extern crate getopts; @@ -33,20 +31,21 @@ mod prn_char; mod prn_float; mod prn_int; -use byteorder_io::*; -use formatteriteminfo::*; -use inputdecoder::{InputDecoder, MemoryDecoder}; -use inputoffset::{InputOffset, Radix}; -use multifilereader::*; -use output_info::OutputInfo; -use parse_formats::{parse_format_flags, ParsedFormatterItemInfo}; -use parse_inputs::{parse_inputs, CommandLineInputs}; -use parse_nrofbytes::parse_number_of_bytes; -use partialreader::*; -use peekreader::*; -use prn_char::format_ascii_dump; use std::cmp; +use crate::byteorder_io::*; +use crate::formatteriteminfo::*; +use crate::inputdecoder::{InputDecoder, MemoryDecoder}; +use crate::inputoffset::{InputOffset, Radix}; +use crate::multifilereader::*; +use crate::output_info::OutputInfo; +use crate::parse_formats::{parse_format_flags, ParsedFormatterItemInfo}; +use crate::parse_inputs::{parse_inputs, CommandLineInputs}; +use crate::parse_nrofbytes::parse_number_of_bytes; +use crate::partialreader::*; +use crate::peekreader::*; +use crate::prn_char::format_ascii_dump; + static VERSION: &str = env!("CARGO_PKG_VERSION"); const PEEK_BUFFER_SIZE: usize = 4; // utf-8 can be 4 bytes @@ -57,14 +56,14 @@ static USAGE: &str = r#"Usage: Displays data in various human-readable formats. If multiple formats are specified, the output will contain all formats in the order they appear on the -commandline. Each format will be printed on a new line. Only the line +command line. Each format will be printed on a new line. Only the line containing the first format will be prefixed with the offset. If no filename is specified, or it is "-", stdin will be used. After a "--", no -more options will be recognised. This allows for filenames starting with a "-". +more options will be recognized. This allows for filenames starting with a "-". If a filename is a valid number which can be used as an offset in the second -form, you can force it to be recognised as a filename if you include an option +form, you can force it to be recognized as a filename if you include an option like "-j0", which is only valid in the first form. RADIX is one of o,d,x,n for octal, decimal, hexadecimal or none. @@ -87,7 +86,7 @@ TYPE contains one or more format specifications consisting of: SIZE is the number of bytes which can be the number 1, 2, 4, 8 or 16, or C, I, S, L for 1, 2, 4, 8 bytes for integer types, or F, D, L for 4, 8, 16 bytes for floating point. -Any type specification can have a "z" suffic, which will add a ASCII dump at +Any type specification can have a "z" suffix, which will add a ASCII dump at the end of the line. If an error occurred, a diagnostic message will be printed to stderr, and the @@ -289,7 +288,7 @@ impl OdOptions { } } -/// parses and validates commandline parameters, prepares data structures, +/// parses and validates command line parameters, prepares data structures, /// opens the input and calls `odfunc` to process the input. pub fn uumain(args: Vec) -> i32 { let opts = create_getopts_options(); @@ -297,7 +296,7 @@ pub fn uumain(args: Vec) -> i32 { let matches = match opts.parse(&args[1..]) { Ok(m) => m, Err(f) => { - disp_err!("{}", f); + show_usage_error!("{}", f); return 1; } }; @@ -313,7 +312,7 @@ pub fn uumain(args: Vec) -> i32 { let od_options = match OdOptions::new(matches, args) { Err(s) => { - disp_err!("{}", s); + show_usage_error!("{}", s); return 1; } Ok(o) => o, diff --git a/src/uu/od/src/output_info.rs b/src/uu/od/src/output_info.rs index 01e48c002..b1f25e31f 100644 --- a/src/uu/od/src/output_info.rs +++ b/src/uu/od/src/output_info.rs @@ -1,8 +1,11 @@ -use formatteriteminfo::FormatterItemInfo; -use parse_formats::ParsedFormatterItemInfo; +// spell-checker:ignore formatteriteminfo blocksize thisblock + use std::cmp; use std::slice::Iter; +use crate::formatteriteminfo::FormatterItemInfo; +use crate::parse_formats::ParsedFormatterItemInfo; + /// Size in bytes of the max datatype. ie set to 16 for 128-bit numbers. const MAX_BYTES_PER_UNIT: usize = 8; diff --git a/src/uu/od/src/parse_formats.rs b/src/uu/od/src/parse_formats.rs index 872e5840c..930724d01 100644 --- a/src/uu/od/src/parse_formats.rs +++ b/src/uu/od/src/parse_formats.rs @@ -1,7 +1,9 @@ -use formatteriteminfo::FormatterItemInfo; -use prn_char::*; -use prn_float::*; -use prn_int::*; +// spell-checker:ignore formatteriteminfo docopt fvox fvoxw vals acdx + +use crate::formatteriteminfo::FormatterItemInfo; +use crate::prn_char::*; +use crate::prn_float::*; +use crate::prn_int::*; #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub struct ParsedFormatterItemInfo { @@ -89,9 +91,9 @@ fn od_argument_with_option(ch: char) -> bool { } } -/// Parses format flags from commandline +/// Parses format flags from command line /// -/// getopts, docopt, clap don't seem suitable to parse the commandline +/// getopts, docopt, clap don't seem suitable to parse the command line /// arguments used for formats. In particular arguments can appear /// multiple times and the order they appear in, is significant. /// @@ -99,7 +101,7 @@ fn od_argument_with_option(ch: char) -> bool { /// it can also be mixed with non format related flags like -v: -fvox /// arguments with parameters like -w16 can only appear at the end: -fvoxw16 /// parameters of -t/--format specify 1 or more formats. -/// if -- appears on the commandline, parsing should stop. +/// if -- appears on the command line, parsing should stop. pub fn parse_format_flags(args: &[String]) -> Result, String> { let mut formats = Vec::new(); diff --git a/src/uu/od/src/parse_inputs.rs b/src/uu/od/src/parse_inputs.rs index 21da091e1..89a833d94 100644 --- a/src/uu/od/src/parse_inputs.rs +++ b/src/uu/od/src/parse_inputs.rs @@ -2,10 +2,10 @@ use getopts::Matches; /// Abstraction for getopts pub trait CommandLineOpts { - /// returns all commandline parameters which do not belong to an option. + /// returns all command line parameters which do not belong to an option. fn inputs(&self) -> Vec; /// tests if any of the specified options is present. - fn opts_present(&self, &[&str]) -> bool; + fn opts_present(&self, _: &[&str]) -> bool; } /// Implementation for `getopts` @@ -31,7 +31,7 @@ pub enum CommandLineInputs { FileAndOffset((String, usize, Option)), } -/// Interprets the commandline inputs of od. +/// Interprets the command line inputs of od. /// /// Returns either an unspecified number of filenames. /// Or it will return a single filename, with an offset and optional label. @@ -45,7 +45,7 @@ pub fn parse_inputs(matches: &dyn CommandLineOpts) -> Result + // test if command line contains: [file] // fall-through if no (valid) offset is found if input_strings.len() == 1 || input_strings.len() == 2 { // if any of the options -A, -j, -N, -t, -v or -w are present there is no offset @@ -74,7 +74,7 @@ pub fn parse_inputs(matches: &dyn CommandLineOpts) -> Result) -> Result Result { let mut start = 0; let mut len = s.len(); @@ -159,10 +159,10 @@ pub fn parse_offset_operand(s: &str) -> Result { mod tests { use super::*; - /// A mock for the commandline options type + /// A mock for the command line options type /// - /// `inputs` are all commandline parameters which do not belong to an option. - /// `option_names` are the names of the options on the commandline. + /// `inputs` are all command line parameters which do not belong to an option. + /// `option_names` are the names of the options on the command line. struct MockOptions<'a> { inputs: Vec, option_names: Vec<&'a str>, @@ -245,13 +245,13 @@ mod tests { parse_inputs(&MockOptions::new(vec!["+10a"], vec![""])).unwrap() ); - // if -j is included in the commandline, there cannot be an offset. + // if -j is included in the command line, there cannot be an offset. assert_eq!( CommandLineInputs::FileNames(vec!["+10".to_string()]), parse_inputs(&MockOptions::new(vec!["+10"], vec!["j"])).unwrap() ); - // if -v is included in the commandline, there cannot be an offset. + // if -v is included in the command line, there cannot be an offset. assert_eq!( CommandLineInputs::FileNames(vec!["+10".to_string()]), parse_inputs(&MockOptions::new(vec!["+10"], vec!["o", "v"])).unwrap() @@ -278,7 +278,7 @@ mod tests { parse_inputs(&MockOptions::new(vec!["file1", "+10"], vec!["j"])).unwrap() ); - // offset must be last on the commandline + // offset must be last on the command line assert_eq!( CommandLineInputs::FileNames(vec!["+10".to_string(), "file1".to_string()]), parse_inputs(&MockOptions::new(vec!["+10", "file1"], vec![""])).unwrap() @@ -287,7 +287,7 @@ mod tests { #[test] fn test_parse_inputs_traditional() { - // it should not return FileAndOffset to signal no offset was entered on the commandline. + // it should not return FileAndOffset to signal no offset was entered on the command line. assert_eq!( CommandLineInputs::FileNames(vec!["-".to_string()]), parse_inputs(&MockOptions::new(vec![], vec!["traditional"])).unwrap() diff --git a/src/uu/od/src/partialreader.rs b/src/uu/od/src/partialreader.rs index 265f13dae..2a71cea43 100644 --- a/src/uu/od/src/partialreader.rs +++ b/src/uu/od/src/partialreader.rs @@ -1,8 +1,11 @@ -use multifilereader::HasError; +// spell-checker:ignore mockstream abcdefgh bcdefgh + use std::cmp; use std::io; use std::io::Read; +use crate::multifilereader::HasError; + /// When a large number of bytes must be skipped, it will be read into a /// dynamically allocated buffer. The buffer will be limited to this size. const MAX_SKIP_BUFFER: usize = 64 * 1024; @@ -146,7 +149,7 @@ mod tests { } #[test] - fn test_read_limitting_all() { + fn test_read_limiting_all() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(0)); @@ -154,7 +157,7 @@ mod tests { } #[test] - fn test_read_limitting() { + fn test_read_limiting() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(6)); @@ -163,7 +166,7 @@ mod tests { } #[test] - fn test_read_limitting_with_error() { + fn test_read_limiting_with_error() { let mut v = [0; 10]; let f = FailingMockStream::new(ErrorKind::PermissionDenied, "No access", 3); let mut sut = PartialReader::new(f, 0, Some(6)); @@ -174,7 +177,7 @@ mod tests { } #[test] - fn test_read_limitting_with_large_limit() { + fn test_read_limiting_with_large_limit() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(20)); @@ -183,7 +186,7 @@ mod tests { } #[test] - fn test_read_limitting_with_multiple_reads() { + fn test_read_limiting_with_multiple_reads() { let mut v = [0; 3]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 0, Some(6)); @@ -195,7 +198,7 @@ mod tests { } #[test] - fn test_read_skipping_and_limitting() { + fn test_read_skipping_and_limiting() { let mut v = [0; 10]; let mut sut = PartialReader::new(Cursor::new(&b"abcdefgh"[..]), 2, Some(4)); diff --git a/src/uu/od/src/peekreader.rs b/src/uu/od/src/peekreader.rs index be82e1266..73a94d2e2 100644 --- a/src/uu/od/src/peekreader.rs +++ b/src/uu/od/src/peekreader.rs @@ -1,9 +1,12 @@ +// spell-checker:ignore (ToDO) tempbuffer abcdefgh abcdefghij + //! Contains the trait `PeekRead` and type `PeekReader` implementing it. -use multifilereader::HasError; use std::io; use std::io::{Read, Write}; +use crate::multifilereader::HasError; + /// A trait which supplies a function to peek into a stream without /// actually reading it. /// diff --git a/src/uu/od/src/prn_char.rs b/src/uu/od/src/prn_char.rs index fadc2d11b..cbbb370ce 100644 --- a/src/uu/od/src/prn_char.rs +++ b/src/uu/od/src/prn_char.rs @@ -1,6 +1,9 @@ -use formatteriteminfo::*; +// spell-checker:ignore (ToDO) CHRS itembytes MUTF + use std::str::from_utf8; +use crate::formatteriteminfo::*; + pub static FORMAT_ITEM_A: FormatterItemInfo = FormatterItemInfo { byte_size: 1, print_width: 4, diff --git a/src/uu/od/src/prn_float.rs b/src/uu/od/src/prn_float.rs index 109ce041a..422d3285a 100644 --- a/src/uu/od/src/prn_float.rs +++ b/src/uu/od/src/prn_float.rs @@ -1,9 +1,10 @@ -use formatteriteminfo::*; use half::f16; use std::f32; use std::f64; use std::num::FpCategory; +use crate::formatteriteminfo::*; + pub static FORMAT_ITEM_F16: FormatterItemInfo = FormatterItemInfo { byte_size: 2, print_width: 10, diff --git a/src/uu/od/src/prn_int.rs b/src/uu/od/src/prn_int.rs index 0de656117..b8397b01b 100644 --- a/src/uu/od/src/prn_int.rs +++ b/src/uu/od/src/prn_int.rs @@ -1,4 +1,6 @@ -use formatteriteminfo::*; +// spell-checker:ignore (ToDO) itembytes + +use crate::formatteriteminfo::*; /// format string to print octal using `int_writer_unsigned` macro_rules! OCT { diff --git a/src/uu/paste/Cargo.toml b/src/uu/paste/Cargo.toml index 6673311a4..200e189c3 100644 --- a/src/uu/paste/Cargo.toml +++ b/src/uu/paste/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "paste" +name = "uu_paste" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "paste ~ (uutils) merge lines from inputs" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/paste" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_paste" path = "src/paste.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..0b0d1880a 100644 --- a/src/uu/paste/src/paste.rs +++ b/src/uu/paste/src/paste.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) delim extern crate getopts; diff --git a/src/uu/pathchk/Cargo.toml b/src/uu/pathchk/Cargo.toml index c554356cd..3db2a5750 100644 --- a/src/uu/pathchk/Cargo.toml +++ b/src/uu/pathchk/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "pathchk" +name = "uu_pathchk" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "pathchk ~ (uutils) diagnose invalid or non-portable PATHNAME" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/pathchk" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..dd0cee3ef 100644 --- a/src/uu/pathchk/src/pathchk.rs +++ b/src/uu/pathchk/src/pathchk.rs @@ -1,14 +1,13 @@ #![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. + +// spell-checker:ignore (ToDO) lstat extern crate getopts; extern crate libc; diff --git a/src/uu/pinky/Cargo.toml b/src/uu/pinky/Cargo.toml index 6bb45200f..1f2bfc13b 100644 --- a/src/uu/pinky/Cargo.toml +++ b/src/uu/pinky/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "pinky" +name = "uu_pinky" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "pinky ~ (uutils) display user information" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/pinky" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_pinky" path = "src/pinky.rs" [dependencies] -uucore = { version = "0.0.2", features = ["utmpx", "entries"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx", "entries"] } +uucore_procs = { version="0.0.4", 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..1d089450c 100644 --- a/src/uu/pinky/src/pinky.rs +++ b/src/uu/pinky/src/pinky.rs @@ -1,13 +1,11 @@ -#![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))] + +// spell-checker:ignore (ToDO) BUFSIZE gecos fullname, mesg iobuf #[macro_use] extern crate uucore; @@ -48,7 +46,7 @@ pub fn uumain(args: Vec) -> i32 { The utmp file will be {}", utmpx::DEFAULT_FILE ); - let mut opts = new_coreopts!(SYNTAX, SUMMARY, &long_help); + let mut opts = app!(SYNTAX, SUMMARY, &long_help); opts.optflag( "l", "", @@ -120,7 +118,7 @@ The utmp file will be {}", } if !do_short_format && matches.free.is_empty() { - disp_err!("no username specified; at least one must be specified when using -l"); + show_usage_error!("no username specified; at least one must be specified when using -l"); return 1; } @@ -137,7 +135,7 @@ The utmp file will be {}", if do_short_format { if let Err(e) = pk.short_pinky() { - disp_err!("{}", e); + show_usage_error!("{}", e); 1 } else { 0 diff --git a/src/uu/printenv/Cargo.toml b/src/uu/printenv/Cargo.toml index 473adfab4..d3c4376a6 100644 --- a/src/uu/printenv/Cargo.toml +++ b/src/uu/printenv/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "printenv" +name = "uu_printenv" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "printenv ~ (uutils) display value of environment VAR" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/printenv" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_printenv" path = "src/printenv.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..7ac01a597 100644 --- a/src/uu/printf/Cargo.toml +++ b/src/uu/printf/Cargo.toml @@ -1,18 +1,27 @@ [package] -name = "printf" +name = "uu_printf" version = "0.0.1" -authors = ["Nathan Ross"] +authors = [ + "Nathan Ross", + "uutils developers", +] license = "MIT" -build = "../../common/mkmain.rs" +description = "printf ~ (uutils) FORMAT and display ARGUMENTS" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/printf" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_printf" path = "src/printf.rs" [dependencies] itertools = "0.8.0" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/cli.rs b/src/uu/printf/src/cli.rs index 62aeb8a7c..12e80a925 100644 --- a/src/uu/printf/src/cli.rs +++ b/src/uu/printf/src/cli.rs @@ -1,5 +1,7 @@ //! stdio convenience fns +// spell-checker:ignore (ToDO) bslice + use std::env; use std::io::{stderr, stdout, Write}; 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/memo.rs b/src/uu/printf/src/memo.rs index 5f3eee482..2f12f9192 100644 --- a/src/uu/printf/src/memo.rs +++ b/src/uu/printf/src/memo.rs @@ -1,17 +1,18 @@ //! Memo runner of printf //! Takes a format string and arguments -//! 1. tokenizes format string into tokens, consuming +//! 1. tokenize format string into tokens, consuming //! any subst. arguments along the way. //! 2. feeds remaining arguments into function //! that prints tokens. -use cli; use itertools::put_back_n; use std::iter::Peekable; use std::slice::Iter; -use tokenize::sub::Sub; -use tokenize::token::{Token, Tokenizer}; -use tokenize::unescaped_text::UnescapedText; + +use crate::cli; +use crate::tokenize::sub::Sub; +use crate::tokenize::token::{Token, Tokenizer}; +use crate::tokenize::unescaped_text::UnescapedText; pub struct Memo { tokens: Vec>, diff --git a/src/uu/printf/src/printf.rs b/src/uu/printf/src/printf.rs index 8bde95b74..3062d52de 100644 --- a/src/uu/printf/src/printf.rs +++ b/src/uu/printf/src/printf.rs @@ -1,6 +1,8 @@ -#![crate_name = "uu_printf"] #![allow(dead_code)] +// spell-checker:ignore (change!) each's +// spell-checker:ignore (ToDO) LONGHELP FORMATSTRING templating parameterizing formatstr + extern crate itertools; extern crate uucore; diff --git a/src/uu/printf/src/tokenize/num_format/format_field.rs b/src/uu/printf/src/tokenize/num_format/format_field.rs index eb59fde05..68786e815 100644 --- a/src/uu/printf/src/tokenize/num_format/format_field.rs +++ b/src/uu/printf/src/tokenize/num_format/format_field.rs @@ -1,4 +1,6 @@ -//! Primitievs used by Sub Tokenizer +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum fprim interp + +//! Primitives used by Sub Tokenizer //! and num_format modules #[derive(Clone)] pub enum FieldType { diff --git a/src/uu/printf/src/tokenize/num_format/formatter.rs b/src/uu/printf/src/tokenize/num_format/formatter.rs index f770823de..35faff2a9 100644 --- a/src/uu/printf/src/tokenize/num_format/formatter.rs +++ b/src/uu/printf/src/tokenize/num_format/formatter.rs @@ -1,11 +1,15 @@ +// spell-checker:ignore (ToDO) inprefix for conv + //! Primitives used by num_format and sub_modules. //! never dealt with above (e.g. Sub Tokenizer never uses these) -use super::format_field::FormatField; -use cli; use itertools::{put_back_n, PutBackN}; use std::str::Chars; +use super::format_field::FormatField; + +use crate::cli; + // contains the rough ingredients to final // output for a number, organized together // to allow for easy generalization of output manipulation @@ -53,7 +57,7 @@ pub trait Formatter { inprefix: &InPrefix, str_in: &str, ) -> Option; - // return a string from a formatprimitive, + // return a string from a FormatPrimitive, // given information about the field fn primitive_to_str(&self, prim: &FormatPrimitive, field: FormatField) -> String; } diff --git a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs index f288e95cc..0ea984e0b 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) arrnum mult basenum bufferval refd vals arrfloat conv intermed addl + pub fn arrnum_int_mult(arr_num: &[u8], basenum: u8, base_ten_int_fact: u8) -> Vec { let mut carry: u16 = 0; let mut rem: u16; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs index 55e7fdfca..fcac4392e 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv arrnum mult shortcircuit + #[cfg(test)] use super::*; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs b/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs index 6e9cdc757..33c3a7af5 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum + //! formatter for %a %F C99 Hex-floating-point subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/decf.rs b/src/uu/printf/src/tokenize/num_format/formatters/decf.rs index 2cbb3f696..7974271a3 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/decf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/decf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum fprim interp + //! formatter for %g %G decimal subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs b/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs index 430af3347..65fe5b6ea 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum + use super::super::format_field::FormatField; use super::super::formatter::{get_it_at, warn_incomplete_conv, Base, FormatPrimitive, InPrefix}; use super::base_conv; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs b/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs index 46d7c9682..97ceafe8d 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) floatf inprefix + //! formatter for %f %F common-notation floating-point subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/intf.rs b/src/uu/printf/src/tokenize/num_format/formatters/intf.rs index 5b524897f..489420c41 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/intf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/intf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) fchar conv decr inprefix intf ints finalstr + //! formatter for unsigned and signed int subs //! unsigned ints: %X %x (hex u64) %o (octal u64) %u (base ten u64) //! signed ints: %i %d (both base ten i64) @@ -193,7 +195,7 @@ impl Formatter for Intf { *field.field_char == 'i' || *field.field_char == 'd', inprefix, ); - // We always will have a formatprimitive to return + // We always will have a format primitive to return Some(if convert_hints.len_digits == 0 || convert_hints.is_zero { // if non-digit or end is reached before a non-zero digit let mut fmt_prim: FormatPrimitive = Default::default(); diff --git a/src/uu/printf/src/tokenize/num_format/formatters/mod.rs b/src/uu/printf/src/tokenize/num_format/formatters/mod.rs index f6e2e7389..ccbcdb1e7 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/mod.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/mod.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv cninetyninehexfloatf floatf intf scif + mod base_conv; pub mod cninetyninehexfloatf; pub mod decf; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/scif.rs b/src/uu/printf/src/tokenize/num_format/formatters/scif.rs index f9092d1ca..69a703042 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/scif.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/scif.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix + //! formatter for %e %E scientific notation subs use super::super::format_field::FormatField; use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; diff --git a/src/uu/printf/src/tokenize/num_format/num_format.rs b/src/uu/printf/src/tokenize/num_format/num_format.rs index 8b3f245fe..44afd2e66 100644 --- a/src/uu/printf/src/tokenize/num_format/num_format.rs +++ b/src/uu/printf/src/tokenize/num_format/num_format.rs @@ -1,5 +1,10 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety qchar topchar structs fmtr fchar inprefix devs octals cninetyninehexfloatf + //! handles creating printed output for numeric substitutions +use std::env; +use std::vec::Vec; + use super::format_field::{FieldType, FormatField}; use super::formatter::{Base, FormatPrimitive, Formatter, InPrefix}; use super::formatters::cninetyninehexfloatf::CninetyNineHexFloatf; @@ -7,9 +12,8 @@ use super::formatters::decf::Decf; use super::formatters::floatf::Floatf; use super::formatters::intf::Intf; use super::formatters::scif::Scif; -use cli; -use std::env; -use std::vec::Vec; + +use crate::cli; pub fn warn_expected_numeric(pf_arg: &str) { // important: keep println here not print diff --git a/src/uu/printf/src/tokenize/sub.rs b/src/uu/printf/src/tokenize/sub.rs index 6e460268c..bf3fea211 100644 --- a/src/uu/printf/src/tokenize/sub.rs +++ b/src/uu/printf/src/tokenize/sub.rs @@ -1,13 +1,10 @@ +// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety + //! Sub is a token that represents a //! segment of the format string that is a substitution //! it is created by Sub's implementation of the Tokenizer trait //! Subs which have numeric field chars make use of the num_format //! submodule -use super::num_format::format_field::{FieldType, FormatField}; -use super::num_format::num_format; -use super::token; -use super::unescaped_text::UnescapedText; -use cli; use itertools::{put_back_n, PutBackN}; use std::iter::Peekable; use std::process::exit; @@ -15,6 +12,12 @@ use std::slice::Iter; use std::str::Chars; // use std::collections::HashSet; +use super::num_format::format_field::{FieldType, FormatField}; +use super::num_format::num_format; +use super::token; +use super::unescaped_text::UnescapedText; +use crate::cli; + fn err_conv(sofar: &str) { cli::err_msg(&format!("%{}: invalid conversion specification", sofar)); exit(cli::EXIT_ERR); diff --git a/src/uu/printf/src/tokenize/token.rs b/src/uu/printf/src/tokenize/token.rs index 2e0cdd812..1d8ee5ead 100644 --- a/src/uu/printf/src/tokenize/token.rs +++ b/src/uu/printf/src/tokenize/token.rs @@ -6,7 +6,7 @@ use std::str::Chars; // A token object is an object that can print the expected output // of a contiguous segment of the format string, and -// requires at most 1 argusegment +// requires at most 1 argument pub trait Token { fn print(&self, args: &mut Peekable>); } diff --git a/src/uu/printf/src/tokenize/unescaped_text.rs b/src/uu/printf/src/tokenize/unescaped_text.rs index 5c7ee603b..b6fdd1aa1 100644 --- a/src/uu/printf/src/tokenize/unescaped_text.rs +++ b/src/uu/printf/src/tokenize/unescaped_text.rs @@ -3,8 +3,8 @@ //! and escaped character literals (of allowed escapes), //! into an unescaped text byte array -use super::token; -use cli; +// spell-checker:ignore (ToDO) retval hexchars octals printf's bvec vals coreutil addchar eval bytecode + use itertools::PutBackN; use std::char::from_u32; use std::iter::Peekable; @@ -12,6 +12,10 @@ use std::process::exit; use std::slice::Iter; use std::str::Chars; +use super::token; + +use crate::cli; + pub struct UnescapedText(Vec); impl UnescapedText { fn new() -> UnescapedText { diff --git a/src/uu/ptx/Cargo.toml b/src/uu/ptx/Cargo.toml index e3d6135ff..e906981c6 100644 --- a/src/uu/ptx/Cargo.toml +++ b/src/uu/ptx/Cargo.toml @@ -1,12 +1,17 @@ [package] -name = "ptx" +name = "uu_ptx" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "ptx ~ (uutils) display a permuted index of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/ptx" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_ptx" path = "src/ptx.rs" [dependencies] @@ -16,8 +21,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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..5c52c2680 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDOs) corasick memchr Roff trunc oset iset extern crate aho_corasick; extern crate getopts; diff --git a/src/uu/pwd/Cargo.toml b/src/uu/pwd/Cargo.toml index 328fda9e8..ef25017d1 100644 --- a/src/uu/pwd/Cargo.toml +++ b/src/uu/pwd/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "pwd" +name = "uu_pwd" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "pwd ~ (uutils) display current working directory" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/pwd" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_pwd" path = "src/pwd.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..058b778a0 100644 --- a/src/uu/readlink/Cargo.toml +++ b/src/uu/readlink/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "readlink" +name = "uu_readlink" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "readlink ~ (uutils) display resolved path of PATHNAME" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/readlink" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..d81ca8e14 100644 --- a/src/uu/readlink/src/readlink.rs +++ b/src/uu/readlink/src/readlink.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) errno extern crate getopts; diff --git a/src/uu/realpath/Cargo.toml b/src/uu/realpath/Cargo.toml index c79c5f5a7..4cd083c54 100644 --- a/src/uu/realpath/Cargo.toml +++ b/src/uu/realpath/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "realpath" +name = "uu_realpath" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "realpath ~ (uutils) display resolved absolute path of PATHNAME" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/realpath" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_realpath" path = "src/realpath.rs" [dependencies] getopts = "0.2.18" -uucore = { version = "0.0.2", features = ["fs"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..780b7964b 100644 --- a/src/uu/realpath/src/realpath.rs +++ b/src/uu/realpath/src/realpath.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) retcode extern crate getopts; diff --git a/src/uu/relpath/Cargo.toml b/src/uu/relpath/Cargo.toml index 6bb6cb4de..ff2f3120e 100644 --- a/src/uu/relpath/Cargo.toml +++ b/src/uu/relpath/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "relpath" +name = "uu_relpath" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "relpath ~ (uutils) display relative path of PATHNAME_TO from PATHNAME_FROM" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/relpath" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_relpath" path = "src/relpath.rs" [dependencies] getopts = "0.2.18" -uucore = { version = "0.0.2", features = ["fs"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..f66d7ae41 100644 --- a/src/uu/relpath/src/relpath.rs +++ b/src/uu/relpath/src/relpath.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) subpath absto absfrom absbase extern crate getopts; diff --git a/src/uu/rm/Cargo.toml b/src/uu/rm/Cargo.toml index bbaaaea53..8fbd14663 100644 --- a/src/uu/rm/Cargo.toml +++ b/src/uu/rm/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "rm" +name = "uu_rm" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "rm ~ (uutils) remove PATHNAME" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/rm" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..4b08a5789 100644 --- a/src/uu/rm/src/rm.rs +++ b/src/uu/rm/src/rm.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) bitor ulong extern crate getopts; extern crate remove_dir_all; diff --git a/src/uu/rmdir/Cargo.toml b/src/uu/rmdir/Cargo.toml index 233e9bdc8..1a8705d7c 100644 --- a/src/uu/rmdir/Cargo.toml +++ b/src/uu/rmdir/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "rmdir" +name = "uu_rmdir" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "rmdir ~ (uutils) remove empty DIRECTORY" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/rmdir" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_rmdir" path = "src/rmdir.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..29d1eb1cf 100644 --- a/src/uu/seq/Cargo.toml +++ b/src/uu/seq/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "seq" +name = "uu_seq" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "seq ~ (uutils) display a sequence of numbers" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/seq" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_seq" path = "src/seq.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..1ca4c8a9b 100644 --- a/src/uu/seq/src/seq.rs +++ b/src/uu/seq/src/seq.rs @@ -1,8 +1,8 @@ -#![crate_name = "uu_seq"] - // TODO: Make -w flag work with decimals // TODO: Support -f flag +// spell-checker:ignore (ToDO) istr chiter argptr ilen + extern crate getopts; #[macro_use] diff --git a/src/uu/shred/Cargo.toml b/src/uu/shred/Cargo.toml index e23dce935..12cc3926e 100644 --- a/src/uu/shred/Cargo.toml +++ b/src/uu/shred/Cargo.toml @@ -1,12 +1,17 @@ [package] -name = "shred" +name = "uu_shred" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "shred ~ (uutils) hide former FILE contents with repeated overwrites" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/shred" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_shred" path = "src/shred.rs" [dependencies] @@ -15,8 +20,9 @@ getopts = "0.2.18" libc = "0.2.42" rand = "0.5" time = "0.1.40" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..27ba1e1a2 100644 --- a/src/uu/shred/src/shred.rs +++ b/src/uu/shred/src/shred.rs @@ -1,14 +1,12 @@ -#![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. -*/ +// spell-checker:ignore (ToDO) NAMESET FILESIZE fstab coeff journaling writeback REiser journaled extern crate getopts; extern crate rand; diff --git a/src/uu/shuf/Cargo.toml b/src/uu/shuf/Cargo.toml index 755b3c207..128fb939c 100644 --- a/src/uu/shuf/Cargo.toml +++ b/src/uu/shuf/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "shuf" +name = "uu_shuf" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "shuf ~ (uutils) display random permutations of input lines" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/shuf" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_shuf" path = "src/shuf.rs" [dependencies] getopts = "0.2.18" rand = "0.5" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..6b4a34121 100644 --- a/src/uu/shuf/src/shuf.rs +++ b/src/uu/shuf/src/shuf.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) cmdline evec seps rvec fdata extern crate getopts; extern crate rand; diff --git a/src/uu/sleep/Cargo.toml b/src/uu/sleep/Cargo.toml index ccfcf092b..09d3d1289 100644 --- a/src/uu/sleep/Cargo.toml +++ b/src/uu/sleep/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "sleep" +name = "uu_sleep" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "sleep ~ (uutils) pause for DURATION" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/sleep" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["parse_time"] } +uucore_procs = { version="0.0.4", 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..c9e643cf3 100644 --- a/src/uu/sort/Cargo.toml +++ b/src/uu/sort/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "sort" +name = "uu_sort" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "sort ~ (uutils) sort input lines" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/sort" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..92b91bf29 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -1,14 +1,13 @@ -#![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)] +// spell-checker:ignore (ToDO) outfile nondictionary + extern crate getopts; extern crate semver; @@ -526,7 +525,7 @@ fn version_compare(a: &str, b: &str) -> Ordering { fn remove_nondictionary_chars(s: &str) -> String { // Using 'is_ascii_whitespace()' instead of 'is_whitespace()', because it // uses only symbols compatible with UNIX sort (space, tab, newline). - // 'is_whitespace()' uses more symbols as whitespaces (e.g. vertical tab). + // 'is_whitespace()' uses more symbols as whitespace (e.g. vertical tab). s.chars() .filter(|c| c.is_alphanumeric() || c.is_ascii_whitespace()) .collect::() diff --git a/src/uu/split/Cargo.toml b/src/uu/split/Cargo.toml index a2904515d..90563345a 100644 --- a/src/uu/split/Cargo.toml +++ b/src/uu/split/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "split" +name = "uu_split" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "split ~ (uutils) split input into output files" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/split" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_split" path = "src/split.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..181224f2a 100644 --- a/src/uu/split/src/split.rs +++ b/src/uu/split/src/split.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) PREFIXaa extern crate getopts; @@ -147,7 +145,7 @@ struct SplitControl { trait Splitter { // Consume the current_line and return the consumed string - fn consume(&mut self, &mut SplitControl) -> String; + fn consume(&mut self, _: &mut SplitControl) -> String; } struct LineSplitter { diff --git a/src/uu/stat/Cargo.toml b/src/uu/stat/Cargo.toml index 4fc924645..ddc280f5e 100644 --- a/src/uu/stat/Cargo.toml +++ b/src/uu/stat/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "stat" +name = "uu_stat" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "stat ~ (uutils) display FILE status" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/stat" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "libc"] } +uucore_procs = { version="0.0.4", 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/fsext.rs b/src/uu/stat/src/fsext.rs index 3a36c9296..11c8f8095 100644 --- a/src/uu/stat/src/fsext.rs +++ b/src/uu/stat/src/fsext.rs @@ -4,18 +4,18 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// -pub use super::uucore::libc; +// spell-checker:ignore (ToDO) strerror IFBLK IFCHR IFDIR IFLNK IFIFO IFMT IFREG IFSOCK subsec nanos gnulib statfs Sstatfs bitrig statvfs iosize blksize fnodes fsid namelen bsize bfree bavail ffree frsize namemax errno fstype adfs acfs aufs affs autofs befs bdevfs binfmt ceph cgroups cifs configfs cramfs cgroupfs debugfs devfs devpts ecryptfs btrfs efivarfs exofs fhgfs fuseblk fusectl futexfs gpfs hfsx hostfs hpfs inodefs ibrix inotifyfs isofs jffs logfs hugetlbfs mqueue nsfs ntfs ocfs panfs pipefs ramfs romfs nfsd nilfs pstorefs reiserfs securityfs smackfs snfs sockfs squashfs sysfs sysv tempfs tracefs ubifs usbdevfs vmhgfs tmpfs vxfs wslfs xenfs vzfs openprom overlayfs + extern crate time; use self::time::Timespec; -pub use libc::{ +use std::time::UNIX_EPOCH; +pub use uucore::libc::{ c_int, mode_t, strerror, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, S_IRGRP, S_IROTH, S_IRUSR, S_ISGID, S_ISUID, S_ISVTX, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, S_IXUSR, }; -use std::time::UNIX_EPOCH; pub trait BirthTime { fn pretty_birth(&self) -> String; @@ -153,7 +153,7 @@ use std::path::Path; target_os = "android", target_os = "freebsd" ))] -use libc::statfs as Sstatfs; +use uucore::libc::statfs as Sstatfs; #[cfg(any( target_os = "openbsd", target_os = "netbsd", @@ -161,7 +161,7 @@ use libc::statfs as Sstatfs; target_os = "bitrig", target_os = "dragonfly" ))] -use libc::statvfs as Sstatfs; +use uucore::libc::statvfs as Sstatfs; #[cfg(any( target_os = "linux", @@ -169,7 +169,7 @@ use libc::statvfs as Sstatfs; target_os = "android", target_os = "freebsd" ))] -use libc::statfs as statfs_fn; +use uucore::libc::statfs as statfs_fn; #[cfg(any( target_os = "openbsd", target_os = "netbsd", @@ -177,7 +177,7 @@ use libc::statfs as statfs_fn; target_os = "bitrig", target_os = "dragonfly" ))] -use libc::statvfs as statfs_fn; +use uucore::libc::statvfs as statfs_fn; pub trait FsMeta { fn fs_type(&self) -> i64; 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..af02bbbeb 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -1,19 +1,18 @@ -#![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. -// + +// spell-checker:ignore (ToDO) mtab fsext showfs otype fmtstr prec ftype blocksize nlink rdev fnodes fsid namelen blksize inodes fstype iosize statfs gnulib NBLOCKSIZE extern crate getopts; use getopts::Options; #[macro_use] mod fsext; -pub use fsext::*; +pub use crate::fsext::*; #[macro_use] extern crate uucore; @@ -894,7 +893,7 @@ pub fn uumain(args: Vec) -> i32 { let matches = match opts.parse(&args[1..]) { Ok(m) => m, Err(f) => { - disp_err!("{}", f); + show_usage_error!("{}", f); return 1; } }; @@ -906,7 +905,7 @@ pub fn uumain(args: Vec) -> i32 { } if matches.free.is_empty() { - disp_err!("missing operand"); + show_usage_error!("missing operand"); return 1; } diff --git a/src/uu/stat/src/test_stat.rs b/src/uu/stat/src/test_stat.rs index 387cd5e6b..05e91fb84 100644 --- a/src/uu/stat/src/test_stat.rs +++ b/src/uu/stat/src/test_stat.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) scanutil qzxc dqzxc + pub use super::*; #[test] diff --git a/src/uu/stdbuf/Cargo.toml b/src/uu/stdbuf/Cargo.toml index f59d252f4..fd8d50846 100644 --- a/src/uu/stdbuf/Cargo.toml +++ b/src/uu/stdbuf/Cargo.toml @@ -1,22 +1,28 @@ [package] -name = "stdbuf" +name = "uu_stdbuf" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "build.rs" +description = "stdbuf ~ (uutils) run COMMAND with modified standard stream buffering" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/stdbuf" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..c005072d9 100644 --- a/src/uu/stdbuf/build.rs +++ b/src/uu/stdbuf/build.rs @@ -1,10 +1,9 @@ +// spell-checker:ignore (ToDO) dylib libstdbuf deps liblibstdbuf + 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 +20,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..0db28c1c4 100644 --- a/src/uu/stdbuf/src/libstdbuf/Cargo.toml +++ b/src/uu/stdbuf/src/libstdbuf/Cargo.toml @@ -1,19 +1,26 @@ [package] -name = "libstdbuf" +name = "uu_stdbuf_libstdbuf" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" +description = "stdbuf/libstdbuf ~ (uutils); dynamic library required for stdbuf" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/stdbuf" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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/libstdbuf/build.rs b/src/uu/stdbuf/src/libstdbuf/build.rs index a295b4406..95f55ed94 100644 --- a/src/uu/stdbuf/src/libstdbuf/build.rs +++ b/src/uu/stdbuf/src/libstdbuf/build.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) libstdbuf + extern crate cpp_build; use cpp_build::Config; diff --git a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs index 3b8423114..094c18ba6 100644 --- a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs +++ b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) IOFBF IOLBF IONBF cstdio setvbuf + #[macro_use] extern crate cpp; extern crate libc; 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..d8b331e54 100644 --- a/src/uu/stdbuf/src/stdbuf.rs +++ b/src/uu/stdbuf/src/stdbuf.rs @@ -1,13 +1,11 @@ -#![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. -*/ +// spell-checker:ignore (ToDO) tempdir dyld dylib dragonflybsd optgrps libstdbuf extern crate getopts; extern crate tempdir; diff --git a/src/uu/sum/Cargo.toml b/src/uu/sum/Cargo.toml index 939b5803a..2216e905e 100644 --- a/src/uu/sum/Cargo.toml +++ b/src/uu/sum/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "sum" +name = "uu_sum" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "sum ~ (uutils) display checksum and block counts for input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/sum" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_sum" path = "src/sum.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..9f5afe2d2 100644 --- a/src/uu/sum/src/sum.rs +++ b/src/uu/sum/src/sum.rs @@ -1,13 +1,11 @@ -#![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. -*/ +// spell-checker:ignore (ToDO) sysv extern crate getopts; diff --git a/src/uu/sync/Cargo.toml b/src/uu/sync/Cargo.toml index 0d24a5fa5..d6dab2788 100644 --- a/src/uu/sync/Cargo.toml +++ b/src/uu/sync/Cargo.toml @@ -1,21 +1,26 @@ [package] -name = "sync" +name = "uu_sync" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "sync ~ (uutils) synchronize cache writes to storage" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/sync" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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"] } -winapi = { version = "0.3", features = ["handleapi", "winerror"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["wide"] } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } +winapi = { version = "0.3", features = ["errhandlingapi", "fileapi", "handleapi", "std", "winbase", "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..fe417fb8d 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 */ @@ -40,7 +36,6 @@ mod platform { #[cfg(windows)] mod platform { - extern crate kernel32; extern crate winapi; use self::winapi::shared::minwindef; use self::winapi::shared::winerror; @@ -54,13 +49,13 @@ mod platform { unsafe fn flush_volume(name: &str) { let name_wide = name.to_wide_null(); - if kernel32::GetDriveTypeW(name_wide.as_ptr()) == winbase::DRIVE_FIXED { + if winapi::um::fileapi::GetDriveTypeW(name_wide.as_ptr()) == winbase::DRIVE_FIXED { let sliced_name = &name[..name.len() - 1]; // eliminate trailing backslash match OpenOptions::new().write(true).open(sliced_name) { Ok(file) => { - if kernel32::FlushFileBuffers(file.as_raw_handle()) == 0 { + if winapi::um::fileapi::FlushFileBuffers(file.as_raw_handle()) == 0 { crash!( - kernel32::GetLastError() as i32, + winapi::um::errhandlingapi::GetLastError() as i32, "failed to flush file buffer" ); } @@ -76,10 +71,13 @@ mod platform { unsafe fn find_first_volume() -> (String, winnt::HANDLE) { #[allow(deprecated)] let mut name: [winnt::WCHAR; minwindef::MAX_PATH] = mem::uninitialized(); - let handle = kernel32::FindFirstVolumeW(name.as_mut_ptr(), name.len() as minwindef::DWORD); + let handle = winapi::um::fileapi::FindFirstVolumeW( + name.as_mut_ptr(), + name.len() as minwindef::DWORD, + ); if handle == handleapi::INVALID_HANDLE_VALUE { crash!( - kernel32::GetLastError() as i32, + winapi::um::errhandlingapi::GetLastError() as i32, "failed to find first volume" ); } @@ -92,15 +90,15 @@ mod platform { loop { #[allow(deprecated)] let mut name: [winnt::WCHAR; minwindef::MAX_PATH] = mem::uninitialized(); - if kernel32::FindNextVolumeW( + if winapi::um::fileapi::FindNextVolumeW( next_volume_handle, name.as_mut_ptr(), name.len() as minwindef::DWORD, ) == 0 { - match kernel32::GetLastError() { + match winapi::um::errhandlingapi::GetLastError() { winerror::ERROR_NO_MORE_FILES => { - kernel32::FindVolumeClose(next_volume_handle); + winapi::um::fileapi::FindVolumeClose(next_volume_handle); return volumes; } err => crash!(err as i32, "failed to find next volume"), diff --git a/src/uu/tac/Cargo.toml b/src/uu/tac/Cargo.toml index 11f69b73e..b5e3867ee 100644 --- a/src/uu/tac/Cargo.toml +++ b/src/uu/tac/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "tac" +name = "uu_tac" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "tac ~ (uutils) concatenate and display input lines in reverse order" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/tac" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_tac" path = "src/tac.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..b833efa2a 100644 --- a/src/uu/tac/src/tac.rs +++ b/src/uu/tac/src/tac.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) sbytes slen extern crate getopts; diff --git a/src/uu/tail/Cargo.toml b/src/uu/tail/Cargo.toml index 0789ed5b5..a7cc75d7b 100644 --- a/src/uu/tail/Cargo.toml +++ b/src/uu/tail/Cargo.toml @@ -1,24 +1,29 @@ [package] -name = "tail" +name = "uu_tail" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "tail ~ (uutils) display the last lines of input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/tail" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_tail" path = "src/tail.rs" [dependencies] getopts = "0.2.18" -kernel32-sys = "0.2.2" libc = "0.2.42" -winapi = "0.3" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } +winapi = { version="0.3", features=["fileapi", "handleapi", "processthreadsapi", "synchapi", "winbase"] } [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/platform/redox.rs b/src/uu/tail/src/platform/redox.rs index a3a8c5fa0..2c1efd318 100644 --- a/src/uu/tail/src/platform/redox.rs +++ b/src/uu/tail/src/platform/redox.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (ToDO) ENOSYS EPERM + extern crate syscall; use self::syscall::{Error, ENOSYS, EPERM}; diff --git a/src/uu/tail/src/platform/unix.rs b/src/uu/tail/src/platform/unix.rs index 7f64207f4..bbb1f1965 100644 --- a/src/uu/tail/src/platform/unix.rs +++ b/src/uu/tail/src/platform/unix.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) errno EPERM ENOSYS + extern crate libc; use std::io::Error; diff --git a/src/uu/tail/src/platform/windows.rs b/src/uu/tail/src/platform/windows.rs index fbf9351d4..7faa872e6 100644 --- a/src/uu/tail/src/platform/windows.rs +++ b/src/uu/tail/src/platform/windows.rs @@ -7,11 +7,12 @@ * file that was distributed with this source code. */ -extern crate kernel32; extern crate winapi; -use self::kernel32::{CloseHandle, OpenProcess, WaitForSingleObject}; use self::winapi::shared::minwindef::DWORD; +use self::winapi::um::handleapi::CloseHandle; +use self::winapi::um::processthreadsapi::OpenProcess; +use self::winapi::um::synchapi::WaitForSingleObject; use self::winapi::um::winbase::{WAIT_FAILED, WAIT_OBJECT_0}; use self::winapi::um::winnt::{HANDLE, SYNCHRONIZE}; diff --git a/src/uu/tail/src/tail.rs b/src/uu/tail/src/tail.rs index fa21691ea..10b82bd92 100644 --- a/src/uu/tail/src/tail.rs +++ b/src/uu/tail/src/tail.rs @@ -1,15 +1,13 @@ -#![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. - * - */ +// spell-checker:ignore (ToDO) seekable seek'd tail'ing ringbuffer ringbuf extern crate getopts; extern crate libc; diff --git a/src/uu/tee/Cargo.toml b/src/uu/tee/Cargo.toml index a6c44f756..777b9a747 100644 --- a/src/uu/tee/Cargo.toml +++ b/src/uu/tee/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "tee" +name = "uu_tee" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "tee ~ (uutils) display input and copy to FILE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/tee" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..8cc621a63 100644 --- a/src/uu/test/Cargo.toml +++ b/src/uu/test/Cargo.toml @@ -1,21 +1,27 @@ [package] -name = "test" +name = "uu_test" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "test ~ (uutils) evaluate comparison and file type expressions" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/test" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_test" path = "src/test.rs" [dependencies] libc = "0.2.42" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..fa0e3bc58 100644 --- a/src/uu/test/src/test.rs +++ b/src/uu/test/src/test.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) retval paren prec subprec cond extern crate libc; #[cfg(target_os = "redox")] diff --git a/src/uu/timeout/Cargo.toml b/src/uu/timeout/Cargo.toml index 44a02a13e..bc94a4d5a 100644 --- a/src/uu/timeout/Cargo.toml +++ b/src/uu/timeout/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "timeout" +name = "uu_timeout" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "timeout ~ (uutils) run COMMAND with a DURATION time limit" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/timeout" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["parse_time", "process", "signals"] } +uucore_procs = { version="0.0.4", 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..d307f755b 100644 --- a/src/uu/timeout/src/timeout.rs +++ b/src/uu/timeout/src/timeout.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) tstr sigstr cmdname setpgid extern crate getopts; extern crate libc; diff --git a/src/uu/touch/Cargo.toml b/src/uu/touch/Cargo.toml index dd1f5fd58..7372c4347 100644 --- a/src/uu/touch/Cargo.toml +++ b/src/uu/touch/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "touch" +name = "uu_touch" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "touch ~ (uutils) change FILE timestamps" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/touch" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["libc"] } +uucore_procs = { version="0.0.4", 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..6c1b7c0c9 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,8 @@ // // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// + +// spell-checker:ignore (ToDO) filetime strptime utcoff strs datetime MMDDhhmm pub extern crate filetime; extern crate getopts; diff --git a/src/uu/tr/Cargo.toml b/src/uu/tr/Cargo.toml index df3fc69da..6f356cc65 100644 --- a/src/uu/tr/Cargo.toml +++ b/src/uu/tr/Cargo.toml @@ -1,20 +1,26 @@ [package] -name = "tr" +name = "uu_tr" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "tr ~ (uutils) translate characters within input and display" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/tr" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..3291d57ae 100644 --- a/src/uu/tr/src/expand.rs +++ b/src/uu/tr/src/expand.rs @@ -1,13 +1,13 @@ -/* - * 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. + +// spell-checker:ignore (ToDO) allocs slen unesc 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..d8d78a318 100644 --- a/src/uu/tr/src/tr.rs +++ b/src/uu/tr/src/tr.rs @@ -1,16 +1,14 @@ -#![crate_name = "uu_tr"] +// * 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. -/* - * 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. - */ +// spell-checker:ignore (ToDO) allocs bset dflag cflag sflag tflag extern crate bit_set; extern crate fnv; @@ -19,14 +17,14 @@ extern crate getopts; #[macro_use] extern crate uucore; +mod expand; + use bit_set::BitSet; use fnv::FnvHashMap; use getopts::Options; use std::io::{stdin, stdout, BufRead, BufWriter, Write}; -use expand::ExpandSet; - -mod expand; +use crate::expand::ExpandSet; static NAME: &str = "tr"; static VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/src/uu/true/Cargo.toml b/src/uu/true/Cargo.toml index 37db54256..a625e1c45 100644 --- a/src/uu/true/Cargo.toml +++ b/src/uu/true/Cargo.toml @@ -1,17 +1,23 @@ [package] -name = "true" +name = "uu_true" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "true ~ (uutils) do nothing and succeed" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/true" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_true" path = "src/true.rs" [dependencies] -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..7bc4c34c4 100644 --- a/src/uu/truncate/Cargo.toml +++ b/src/uu/truncate/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "truncate" +name = "uu_truncate" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "truncate ~ (uutils) truncate (or extend) FILE to SIZE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/truncate" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_truncate" path = "src/truncate.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..ed34f41c1 100644 --- a/src/uu/truncate/src/truncate.rs +++ b/src/uu/truncate/src/truncate.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) RFILE refsize rfilename fsize tsize extern crate getopts; diff --git a/src/uu/tsort/Cargo.toml b/src/uu/tsort/Cargo.toml index 82f710b1d..74ea51a94 100644 --- a/src/uu/tsort/Cargo.toml +++ b/src/uu/tsort/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "tsort" +name = "uu_tsort" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "tsort ~ (uutils) topologically sort input (partially ordered) pairs" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/tsort" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_tsort" path = "src/tsort.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..ea521b431 100644 --- a/src/uu/tty/Cargo.toml +++ b/src/uu/tty/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "tty" +name = "uu_tty" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "tty ~ (uutils) display the name of the terminal connected to standard input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/tty" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["fs"] } +uucore_procs = { version="0.0.4", 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..20f64c886 100644 --- a/src/uu/tty/src/tty.rs +++ b/src/uu/tty/src/tty.rs @@ -1,15 +1,13 @@ -#![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 - */ +// spell-checker:ignore (ToDO) ttyname filedesc extern crate getopts; extern crate libc; diff --git a/src/uu/uname/Cargo.toml b/src/uu/uname/Cargo.toml index e05270e20..fd0a7ca82 100644 --- a/src/uu/uname/Cargo.toml +++ b/src/uu/uname/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "uname" +name = "uu_uname" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "uname ~ (uutils) display system information" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/uname" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..f96edd8a5 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,10 +5,11 @@ // // 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 +// spell-checker:ignore (ToDO) nodename kernelname kernelrelease kernelversion sysname hwplatform mnrsv + extern crate clap; extern crate platform_info; #[macro_use] diff --git a/src/uu/unexpand/Cargo.toml b/src/uu/unexpand/Cargo.toml index d81f290e4..933349a51 100644 --- a/src/uu/unexpand/Cargo.toml +++ b/src/uu/unexpand/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "unexpand" +name = "uu_unexpand" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "unexpand ~ (uutils) convert input spaces to tabs" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/unexpand" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..148f8960f 100644 --- a/src/uu/unexpand/src/unexpand.rs +++ b/src/uu/unexpand/src/unexpand.rs @@ -1,15 +1,13 @@ -#![crate_name = "uu_unexpand"] +// * 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. -/* - * 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. - */ +// spell-checker:ignore (ToDO) nums aflag uflag scol prevtab amode ctype cwidth nbytes lastcol pctype extern crate getopts; extern crate unicode_width; diff --git a/src/uu/uniq/Cargo.toml b/src/uu/uniq/Cargo.toml index 5263efca4..6de1088b5 100644 --- a/src/uu/uniq/Cargo.toml +++ b/src/uu/uniq/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "uniq" +name = "uu_uniq" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "uniq ~ (uutils) filter identical adjacent lines from input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/uniq" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_uniq" path = "src/uniq.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..5d13953b9 100644 --- a/src/uu/unlink/Cargo.toml +++ b/src/uu/unlink/Cargo.toml @@ -1,19 +1,25 @@ [package] -name = "unlink" +name = "uu_unlink" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "unlink ~ (uutils) remove a (file system) link to FILE" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/unlink" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..2ba716959 100644 --- a/src/uu/unlink/src/unlink.rs +++ b/src/uu/unlink/src/unlink.rs @@ -1,16 +1,14 @@ -#![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 */ +// spell-checker:ignore (ToDO) lstat IFLNK IFMT IFREG + extern crate getopts; extern crate libc; diff --git a/src/uu/uptime/Cargo.toml b/src/uu/uptime/Cargo.toml index 0cb110878..ea1789ab3 100644 --- a/src/uu/uptime/Cargo.toml +++ b/src/uu/uptime/Cargo.toml @@ -1,12 +1,17 @@ [package] -name = "uptime" +name = "uu_uptime" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "uptime ~ (uutils) display dynamic system information" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/uptime" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_uptime" path = "src/uptime.rs" [dependencies] @@ -14,8 +19,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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["libc", "utmpx"] } +uucore_procs = { version="0.0.4", 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..eb0329cd0 100644 --- a/src/uu/uptime/src/uptime.rs +++ b/src/uu/uptime/src/uptime.rs @@ -1,17 +1,15 @@ -#![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 */ +// spell-checker:ignore (ToDO) getloadavg upsecs updays nusers loadavg boottime uphours upmins + extern crate chrono; extern crate clap; extern crate time; @@ -32,11 +30,11 @@ in the run queue over the last 1, 5 and 15 minutes."; static OPT_SINCE: &str = "SINCE"; #[cfg(unix)] -use libc::getloadavg; +use uucore::libc::getloadavg; #[cfg(windows)] extern "C" { - fn GetTickCount() -> libc::uint32_t; + fn GetTickCount() -> uucore::libc::uint32_t; } fn get_usage() -> String { @@ -82,7 +80,7 @@ pub fn uumain(args: Vec) -> i32 { #[cfg(unix)] fn print_loadavg() { - use libc::c_double; + use uucore::libc::c_double; let mut avg: [c_double; 3] = [0.0; 3]; let loads: i32 = unsafe { getloadavg(avg.as_mut_ptr(), 3) }; diff --git a/src/uu/users/Cargo.toml b/src/uu/users/Cargo.toml index 5176646cf..e232839b3 100644 --- a/src/uu/users/Cargo.toml +++ b/src/uu/users/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "users" +name = "uu_users" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "users ~ (uutils) display names of currently logged-in users" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/users" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_users" path = "src/users.rs" [dependencies] getopts = "0.2.18" -uucore = { version = "0.0.2", features = ["utmpx"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx"] } +uucore_procs = { version="0.0.4", 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..84ad1bb95 100644 --- a/src/uu/wc/Cargo.toml +++ b/src/uu/wc/Cargo.toml @@ -1,18 +1,24 @@ [package] -name = "wc" +name = "uu_wc" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "wc ~ (uutils) display newline, word, and byte counts for input" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/wc" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_wc" path = "src/wc.rs" [dependencies] getopts = "0.2.18" -uucore = "0.0.2" +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary" } +uucore_procs = { version="0.0.4", 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..a7c9cda13 100644 --- a/src/uu/wc/src/wc.rs +++ b/src/uu/wc/src/wc.rs @@ -1,13 +1,11 @@ -#![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. - */ +// spell-checker:ignore (ToDO) fpath extern crate getopts; @@ -132,7 +130,7 @@ const SYN: u8 = 0x16 as u8; const FF: u8 = 0x0C as u8; #[inline(always)] -fn is_word_seperator(byte: u8) -> bool { +fn is_word_separator(byte: u8) -> bool { byte == SPACE || byte == TAB || byte == CR || byte == SYN || byte == FF } @@ -185,7 +183,7 @@ fn wc(files: Vec, settings: &Settings) -> StdResult<(), i32> { current_char_count = line.chars().count(); } Err(..) => { - word_count += raw_line.split(|&x| is_word_seperator(x)).count(); + word_count += raw_line.split(|&x| is_word_separator(x)).count(); current_char_count = raw_line.iter().filter(|c| c.is_ascii()).count() } } @@ -193,7 +191,7 @@ fn wc(files: Vec, settings: &Settings) -> StdResult<(), i32> { if current_char_count > longest_line_length { // we subtract one here because `line.len()` includes the LF - // matches GNU 'wc' behaviour + // matches GNU 'wc' behavior longest_line_length = current_char_count - 1; } } diff --git a/src/uu/who/Cargo.toml b/src/uu/who/Cargo.toml index ce8f3c509..6b3646356 100644 --- a/src/uu/who/Cargo.toml +++ b/src/uu/who/Cargo.toml @@ -1,19 +1,23 @@ [package] -name = "who" +name = "uu_who" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -build = "../../common/mkmain.rs" +description = "who ~ (uutils) display information about currently logged-in users" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/who" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_who" path = "src/who.rs" [dependencies] -uucore = { version = "0.0.2", features = ["utmpx"] } -## optional -clippy = { version = "0.0.212", optional = true } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["utmpx"] } +uucore_procs = { version="0.0.4", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" } [[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..dd6090669 100644 --- a/src/uu/who/src/who.rs +++ b/src/uu/who/src/who.rs @@ -4,10 +4,8 @@ // // 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))] + +// spell-checker:ignore (ToDO) ttyname hostnames runlevel mesg wtmp statted boottime deadprocs initspawn clockchange curr runlvline pidstr exitstr hoststr #[macro_use] extern crate uucore; @@ -46,7 +44,7 @@ If ARG1 ARG2 given, -m presumed: 'am i' or 'mom likes' are usual. "; pub fn uumain(args: Vec) -> i32 { - let mut opts = new_coreopts!(SYNTAX, SUMMARY, LONG_HELP); + let mut opts = app!(SYNTAX, SUMMARY, LONG_HELP); opts.optflag("a", "all", "same as -b -d --login -p -r -t -T -u"); opts.optflag("b", "boot", "time of last system boot"); opts.optflag("d", "dead", "print dead processes"); @@ -206,7 +204,7 @@ pub fn uumain(args: Vec) -> i32 { } if matches.free.len() > 2 { - disp_err!("{}", msg_wrong_number_of_arguments!()); + show_usage_error!("{}", msg_wrong_number_of_arguments!()); exit!(1); } } diff --git a/src/uu/whoami/Cargo.toml b/src/uu/whoami/Cargo.toml index f1d315fce..ecda1ae2d 100644 --- a/src/uu/whoami/Cargo.toml +++ b/src/uu/whoami/Cargo.toml @@ -1,21 +1,26 @@ [package] -name = "whoami" +name = "uu_whoami" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -description = "Print effective user ID." -build = "../../common/mkmain.rs" +description = "whoami ~ (uutils) display user name of current effective user ID" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/whoami" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [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.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["entries", "wide"] } +uucore_procs = { version="0.0.4", 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/platform/mod.rs b/src/uu/whoami/src/platform/mod.rs index 12d85ec08..ab0b856e6 100644 --- a/src/uu/whoami/src/platform/mod.rs +++ b/src/uu/whoami/src/platform/mod.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) getusername + #[cfg(unix)] pub use self::unix::getusername; diff --git a/src/uu/whoami/src/platform/unix.rs b/src/uu/whoami/src/platform/unix.rs index 259f806ef..33bfa6025 100644 --- a/src/uu/whoami/src/platform/unix.rs +++ b/src/uu/whoami/src/platform/unix.rs @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) getusername + use std::io::Result; use uucore::entries::uid2usr; use uucore::libc::geteuid; diff --git a/src/uu/whoami/src/platform/windows.rs b/src/uu/whoami/src/platform/windows.rs index 6ae9027f0..7f9490a76 100644 --- a/src/uu/whoami/src/platform/windows.rs +++ b/src/uu/whoami/src/platform/windows.rs @@ -7,6 +7,8 @@ * file that was distributed with this source code. */ +// spell-checker:ignore (ToDO) advapi lmcons winnt getusername WCHAR UNLEN + extern crate advapi32; extern crate uucore; extern crate winapi; diff --git a/src/uu/whoami/src/whoami.rs b/src/uu/whoami/src/whoami.rs index 45e2845da..65b8e73fb 100644 --- a/src/uu/whoami/src/whoami.rs +++ b/src/uu/whoami/src/whoami.rs @@ -1,16 +1,14 @@ -#![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 */ +// spell-checker:ignore (ToDO) getusername + #[macro_use] extern crate clap; #[macro_use] diff --git a/src/uu/yes/Cargo.toml b/src/uu/yes/Cargo.toml index aa5e8967b..1424a15ed 100644 --- a/src/uu/yes/Cargo.toml +++ b/src/uu/yes/Cargo.toml @@ -1,23 +1,29 @@ [package] -name = "yes" +name = "uu_yes" version = "0.0.1" -authors = [] +authors = ["uutils developers"] license = "MIT" -description = "Repeatedly output a line with all specified STRING(s), or 'y'." -build = "../../common/mkmain.rs" +description = "yes ~ (uutils) repeatedly display a line with STRING (or 'y')" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/yes" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" [lib] -name = "uu_yes" path = "src/yes.rs" [dependencies] clap = "2.32" -uucore = { version = "0.0.2", features = ["zero-copy"] } +uucore = { version="0.0.4", package="uucore", git="https://github.com/uutils/uucore.git", branch="canary", features=["zero-copy"] } +uucore_procs = { version="0.0.4", 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/common/util.rs b/tests/common/util.rs index 7ac373c8b..ed6dbc3a3 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -18,9 +18,9 @@ use std::thread::sleep; use std::time::Duration; #[cfg(windows)] -static PROGNAME: &str = "uutils.exe"; +static PROGNAME: &str = concat!(env!("CARGO_PKG_NAME"), ".exe"); #[cfg(not(windows))] -static PROGNAME: &str = "uutils"; +static PROGNAME: &str = env!("CARGO_PKG_NAME"); static TESTS_DIR: &str = "tests"; static FIXTURES_DIR: &str = "fixtures"; diff --git a/tests/test_arch.rs b/tests/test_arch.rs index f5bc3b1e4..d2ec138d9 100644 --- a/tests/test_arch.rs +++ b/tests/test_arch.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_arch() { diff --git a/tests/test_base32.rs b/tests/test_base32.rs index e8785dbd3..d3527d26a 100644 --- a/tests/test_base32.rs +++ b/tests/test_base32.rs @@ -6,7 +6,7 @@ // that was distributed with this source code. // -use common::util::*; +use crate::common::util::*; #[test] fn test_encode() { diff --git a/tests/test_base64.rs b/tests/test_base64.rs index c1b87abcd..6bc0436c5 100644 --- a/tests/test_base64.rs +++ b/tests/test_base64.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_encode() { diff --git a/tests/test_basename.rs b/tests/test_basename.rs index 380935802..fa599644d 100644 --- a/tests/test_basename.rs +++ b/tests/test_basename.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_directory() { diff --git a/tests/test_cat.rs b/tests/test_cat.rs index 26e8a3767..192f7fbbb 100644 --- a/tests/test_cat.rs +++ b/tests/test_cat.rs @@ -2,7 +2,7 @@ extern crate tempdir; #[cfg(unix)] extern crate unix_socket; -use common::util::*; +use crate::common::util::*; #[test] fn test_output_multi_files_print_all_chars() { diff --git a/tests/test_chgrp.rs b/tests/test_chgrp.rs index e950dff79..3bd0c69e5 100644 --- a/tests/test_chgrp.rs +++ b/tests/test_chgrp.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use rust_users::*; #[test] diff --git a/tests/test_chmod.rs b/tests/test_chmod.rs index 4b942c506..612f0860f 100644 --- a/tests/test_chmod.rs +++ b/tests/test_chmod.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::fs::{metadata, set_permissions, OpenOptions}; use std::os::unix::fs::{OpenOptionsExt, PermissionsExt}; use std::sync::Mutex; diff --git a/tests/test_chown.rs b/tests/test_chown.rs index 41d6a235a..fb487cc16 100644 --- a/tests/test_chown.rs +++ b/tests/test_chown.rs @@ -1,11 +1,11 @@ -use common::util::*; +use crate::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_cksum.rs b/tests/test_cksum.rs index d54f3defc..d0bf5ffc8 100644 --- a/tests/test_cksum.rs +++ b/tests/test_cksum.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_single_file() { diff --git a/tests/test_comm.rs b/tests/test_comm.rs index 33d9a0a84..23aeb8309 100644 --- a/tests/test_comm.rs +++ b/tests/test_comm.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn ab_no_args() { diff --git a/tests/test_cp.rs b/tests/test_cp.rs index a878131d9..5b24644d2 100644 --- a/tests/test_cp.rs +++ b/tests/test_cp.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[cfg(not(windows))] use std::fs::set_permissions; diff --git a/tests/test_cut.rs b/tests/test_cut.rs index 7badf493a..fc0f1b1f9 100644 --- a/tests/test_cut.rs +++ b/tests/test_cut.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; static INPUT: &'static str = "lists.txt"; diff --git a/tests/test_date.rs b/tests/test_date.rs index 5d0446b8d..0837878b2 100644 --- a/tests/test_date.rs +++ b/tests/test_date.rs @@ -1,7 +1,7 @@ extern crate regex; use self::regex::Regex; -use common::util::*; +use crate::common::util::*; #[test] fn test_date_email() { diff --git a/tests/test_df.rs b/tests/test_df.rs index 32bb0f481..f79d1beb5 100644 --- a/tests/test_df.rs +++ b/tests/test_df.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_df_compatible_no_size_arg() { diff --git a/tests/test_dircolors.rs b/tests/test_dircolors.rs index 5c1df35d8..f28074075 100644 --- a/tests/test_dircolors.rs +++ b/tests/test_dircolors.rs @@ -1,7 +1,7 @@ -extern crate uu_dircolors; -use self::uu_dircolors::{guess_syntax, OutputFmt, StrUtils}; +use crate::common::util::*; -use common::util::*; +extern crate dircolors; +use self::dircolors::{guess_syntax, OutputFmt, StrUtils}; #[test] fn test_shell_syntax() { diff --git a/tests/test_dirname.rs b/tests/test_dirname.rs index dbb8807fc..bcb4378d6 100644 --- a/tests/test_dirname.rs +++ b/tests/test_dirname.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_path_with_trailing_slashes() { diff --git a/tests/test_du.rs b/tests/test_du.rs index 8189fa2c5..c9704a658 100644 --- a/tests/test_du.rs +++ b/tests/test_du.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; const SUB_DIR: &str = "subdir/deeper"; const SUB_DIR_LINKS: &str = "subdir/links"; diff --git a/tests/test_echo.rs b/tests/test_echo.rs index 1b3517bdb..2d073d60b 100644 --- a/tests/test_echo.rs +++ b/tests/test_echo.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_default() { diff --git a/tests/test_env.rs b/tests/test_env.rs index 8b9da37fb..fde35e726 100644 --- a/tests/test_env.rs +++ b/tests/test_env.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_env_help() { diff --git a/tests/test_expand.rs b/tests/test_expand.rs index a8474e9b3..121ccccec 100644 --- a/tests/test_expand.rs +++ b/tests/test_expand.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_with_tab() { diff --git a/tests/test_expr.rs b/tests/test_expr.rs index be1d6c1e8..bb0760676 100644 --- a/tests/test_expr.rs +++ b/tests/test_expr.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_simple_arithmetic() { diff --git a/tests/test_factor.rs b/tests/test_factor.rs index a6b853064..160a9cbd2 100644 --- a/tests/test_factor.rs +++ b/tests/test_factor.rs @@ -7,7 +7,7 @@ // that was distributed with this source code. // -use common::util::*; +use crate::common::util::*; #[path = "../src/uu/factor/sieve.rs"] mod sieve; diff --git a/tests/test_false.rs b/tests/test_false.rs index 1de4c1565..bbabc7a52 100644 --- a/tests/test_false.rs +++ b/tests/test_false.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_exit_code() { diff --git a/tests/test_fmt.rs b/tests/test_fmt.rs index bf18b4534..e7990a760 100644 --- a/tests/test_fmt.rs +++ b/tests/test_fmt.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_fmt() { diff --git a/tests/test_fold.rs b/tests/test_fold.rs index 9b8c52d78..57f90cee0 100644 --- a/tests/test_fold.rs +++ b/tests/test_fold.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_default_80_column_wrap() { diff --git a/tests/test_hashsum.rs b/tests/test_hashsum.rs index 85f21a358..af4021af4 100644 --- a/tests/test_hashsum.rs +++ b/tests/test_hashsum.rs @@ -8,7 +8,7 @@ macro_rules! test_digest { ($($id:ident $t:ident $size:expr)*) => ($( mod $id { - use::common::util::*; + use crate::common::util::*; static DIGEST_ARG: &'static str = concat!("--", stringify!($t)); static BITS_ARG: &'static str = concat!("--bits=", stringify!($size)); static EXPECTED_FILE: &'static str = concat!(stringify!($id), ".expected"); diff --git a/tests/test_head.rs b/tests/test_head.rs index 4dc34715c..999b44267 100644 --- a/tests/test_head.rs +++ b/tests/test_head.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; static INPUT: &'static str = "lorem_ipsum.txt"; diff --git a/tests/test_hostname.rs b/tests/test_hostname.rs index 4178dafc7..c5ffc5ff1 100644 --- a/tests/test_hostname.rs +++ b/tests/test_hostname.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_hostname() { diff --git a/tests/test_id.rs b/tests/test_id.rs index fe3706d30..822c49560 100644 --- a/tests/test_id.rs +++ b/tests/test_id.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_id() { diff --git a/tests/test_install.rs b/tests/test_install.rs index a9f126fff..e9e70bd93 100644 --- a/tests/test_install.rs +++ b/tests/test_install.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::os::unix::fs::PermissionsExt; #[test] diff --git a/tests/test_join.rs b/tests/test_join.rs index d90103b32..b0311df84 100644 --- a/tests/test_join.rs +++ b/tests/test_join.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn empty_files() { diff --git a/tests/test_link.rs b/tests/test_link.rs index 62460e985..381ea168a 100644 --- a/tests/test_link.rs +++ b/tests/test_link.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_link_existing_file() { diff --git a/tests/test_ln.rs b/tests/test_ln.rs index f7ccb9cd2..5ea81579a 100644 --- a/tests/test_ln.rs +++ b/tests/test_ln.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::path::PathBuf; #[test] diff --git a/tests/test_ls.rs b/tests/test_ls.rs index 8827369a0..18bd66d2e 100644 --- a/tests/test_ls.rs +++ b/tests/test_ls.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_ls_ls() { diff --git a/tests/test_mkdir.rs b/tests/test_mkdir.rs index 67ccd7ca3..70e4e414c 100644 --- a/tests/test_mkdir.rs +++ b/tests/test_mkdir.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; static TEST_DIR1: &'static str = "mkdir_test1"; static TEST_DIR2: &'static str = "mkdir_test2"; diff --git a/tests/test_mktemp.rs b/tests/test_mktemp.rs index f8834b590..722cd8dbc 100644 --- a/tests/test_mktemp.rs +++ b/tests/test_mktemp.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; extern crate tempdir; use self::tempdir::TempDir; @@ -10,9 +10,9 @@ static TEST_TEMPLATE5: &'static str = "tempXXX"; static TEST_TEMPLATE6: &'static str = "tempXXXlate"; static TEST_TEMPLATE7: &'static str = "XXXtemplate"; #[cfg(unix)] -static TEST_TEMPLATE8: &'static str = "tempXXXla/te"; +static TEST_TEMPLATE8: &'static str = "tempXXXl/ate"; #[cfg(windows)] -static TEST_TEMPLATE8: &'static str = "tempXXXla\\te"; +static TEST_TEMPLATE8: &'static str = "tempXXXl\\ate"; const TMPDIR: &'static str = "TMPDIR"; diff --git a/tests/test_more.rs b/tests/test_more.rs index 9d4835769..3b7cfa9a8 100644 --- a/tests/test_more.rs +++ b/tests/test_more.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_more_no_arg() { diff --git a/tests/test_mv.rs b/tests/test_mv.rs index 3ad8dc28c..3fde65f99 100644 --- a/tests/test_mv.rs +++ b/tests/test_mv.rs @@ -2,7 +2,7 @@ extern crate filetime; extern crate time; use self::filetime::*; -use common::util::*; +use crate::common::util::*; #[test] fn test_mv_rename_dir() { diff --git a/tests/test_nl.rs b/tests/test_nl.rs index 4ecc5cc03..fca73c37b 100644 --- a/tests/test_nl.rs +++ b/tests/test_nl.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_stdin_nonewline() { diff --git a/tests/test_numfmt.rs b/tests/test_numfmt.rs index c8b734970..3aa7ab53b 100644 --- a/tests/test_numfmt.rs +++ b/tests/test_numfmt.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_from_si() { diff --git a/tests/test_od.rs b/tests/test_od.rs index a8a721fcf..f3b766c26 100644 --- a/tests/test_od.rs +++ b/tests/test_od.rs @@ -1,7 +1,7 @@ extern crate unindent; use self::unindent::*; -use common::util::*; +use crate::common::util::*; use std::env; use std::fs::remove_file; use std::fs::File; diff --git a/tests/test_paste.rs b/tests/test_paste.rs index 70d4ab275..27de0b445 100644 --- a/tests/test_paste.rs +++ b/tests/test_paste.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_combine_pairs_of_lines() { diff --git a/tests/test_pathchk.rs b/tests/test_pathchk.rs index c471f18d5..bdce377b3 100644 --- a/tests/test_pathchk.rs +++ b/tests/test_pathchk.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_default_mode() { diff --git a/tests/test_pinky.rs b/tests/test_pinky.rs index 6ad25ebbc..c8e8334ab 100644 --- a/tests/test_pinky.rs +++ b/tests/test_pinky.rs @@ -1,11 +1,11 @@ extern crate uucore; -use common::util::*; +use crate::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_printenv.rs b/tests/test_printenv.rs index 1b617d0b2..9d90051ea 100644 --- a/tests/test_printenv.rs +++ b/tests/test_printenv.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::env; #[test] diff --git a/tests/test_printf.rs b/tests/test_printf.rs index 522da18f9..1e3e21d0c 100644 --- a/tests/test_printf.rs +++ b/tests/test_printf.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn basic_literal() { diff --git a/tests/test_ptx.rs b/tests/test_ptx.rs index 09ebcff1c..77117c5c0 100644 --- a/tests/test_ptx.rs +++ b/tests/test_ptx.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn gnu_ext_disabled_roff_no_ref() { diff --git a/tests/test_pwd.rs b/tests/test_pwd.rs index ff3c0ed54..aecb700da 100644 --- a/tests/test_pwd.rs +++ b/tests/test_pwd.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_default() { diff --git a/tests/test_readlink.rs b/tests/test_readlink.rs index 35281fde7..84747b24c 100644 --- a/tests/test_readlink.rs +++ b/tests/test_readlink.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; static GIBBERISH: &'static str = "supercalifragilisticexpialidocious"; diff --git a/tests/test_realpath.rs b/tests/test_realpath.rs index 6855ceb04..1d5b67e68 100644 --- a/tests/test_realpath.rs +++ b/tests/test_realpath.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_current_directory() { diff --git a/tests/test_rm.rs b/tests/test_rm.rs index 9757481c5..88e70946a 100644 --- a/tests/test_rm.rs +++ b/tests/test_rm.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_rm_one_file() { diff --git a/tests/test_rmdir.rs b/tests/test_rmdir.rs index 9e54fe941..5f87b5af6 100644 --- a/tests/test_rmdir.rs +++ b/tests/test_rmdir.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_rmdir_empty_directory_no_parents() { diff --git a/tests/test_seq.rs b/tests/test_seq.rs index ad272ce3d..440a2bc98 100644 --- a/tests/test_seq.rs +++ b/tests/test_seq.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_count_up() { diff --git a/tests/test_sort.rs b/tests/test_sort.rs index d40a8fe95..d3a4e6397 100644 --- a/tests/test_sort.rs +++ b/tests/test_sort.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_numeric_floats_and_ints() { diff --git a/tests/test_split.rs b/tests/test_split.rs index bb66735a4..69a15d807 100644 --- a/tests/test_split.rs +++ b/tests/test_split.rs @@ -3,7 +3,7 @@ extern crate regex; use self::rand::{thread_rng, Rng}; use self::regex::Regex; -use common::util::*; +use crate::common::util::*; use std::fs::{read_dir, File}; use std::io::Write; use std::path::Path; diff --git a/tests/test_stat.rs b/tests/test_stat.rs index e89f91451..225ea52cd 100644 --- a/tests/test_stat.rs +++ b/tests/test_stat.rs @@ -1,9 +1,9 @@ extern crate regex; -use common::util::*; +use crate::common::util::*; -extern crate uu_stat; -pub use self::uu_stat::*; +extern crate stat; +pub use self::stat::*; #[cfg(test)] mod test_fsext { @@ -200,11 +200,16 @@ fn test_terse_normal_format() { println!("expect: {:?}", expect); let v_actual: Vec<&str> = actual.split(' ').collect(); let v_expect: Vec<&str> = expect.split(' ').collect(); + assert!(!v_expect.is_empty()); // * allow for inequality if `stat` (aka, expect) returns "0" (unknown value) - assert!(v_actual - .iter() - .zip(v_expect.iter()) - .all(|(a, e)| a == e || *e == "0")); + assert!( + expect == "0" + || expect == "0\n" + || v_actual + .iter() + .zip(v_expect.iter()) + .all(|(a, e)| a == e || *e == "0" || *e == "0\n") + ); } #[test] @@ -219,11 +224,16 @@ fn test_format_created_time() { let re = regex::Regex::new(r"\s").unwrap(); let v_actual: Vec<&str> = re.split(&actual).collect(); let v_expect: Vec<&str> = re.split(&expect).collect(); + assert!(!v_expect.is_empty()); // * allow for inequality if `stat` (aka, expect) returns "-" (unknown value) - assert!(v_actual - .iter() - .zip(v_expect.iter()) - .all(|(a, e)| a == e || *e == "-")); + assert!( + expect == "-" + || expect == "-\n" + || v_actual + .iter() + .zip(v_expect.iter()) + .all(|(a, e)| a == e || *e == "-" || *e == "-\n") + ); } #[test] @@ -238,11 +248,16 @@ fn test_format_created_seconds() { let re = regex::Regex::new(r"\s").unwrap(); let v_actual: Vec<&str> = re.split(&actual).collect(); let v_expect: Vec<&str> = re.split(&expect).collect(); + assert!(!v_expect.is_empty()); // * allow for inequality if `stat` (aka, expect) returns "0" (unknown value) - assert!(v_actual - .iter() - .zip(v_expect.iter()) - .all(|(a, e)| a == e || *e == "0")); + assert!( + expect == "0" + || expect == "0\n" + || v_actual + .iter() + .zip(v_expect.iter()) + .all(|(a, e)| a == e || *e == "0" || *e == "0\n") + ); } #[test] diff --git a/tests/test_stdbuf.rs b/tests/test_stdbuf.rs index 0d8d667ff..9adb0cfda 100644 --- a/tests/test_stdbuf.rs +++ b/tests/test_stdbuf.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_stdbuf_unbuffered_stdout() { diff --git a/tests/test_sum.rs b/tests/test_sum.rs index 8d6d38801..83cf689ac 100644 --- a/tests/test_sum.rs +++ b/tests/test_sum.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_bsd_single_file() { diff --git a/tests/test_tac.rs b/tests/test_tac.rs index 85c3c21b9..d46f9aec6 100644 --- a/tests/test_tac.rs +++ b/tests/test_tac.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_stdin_default() { diff --git a/tests/test_tail.rs b/tests/test_tail.rs index ecf40a655..824071190 100644 --- a/tests/test_tail.rs +++ b/tests/test_tail.rs @@ -1,7 +1,7 @@ -extern crate uu_tail; +extern crate tail; -use self::uu_tail::parse_size; -use common::util::*; +use self::tail::parse_size; +use crate::common::util::*; use std::char::from_digit; use std::io::Write; use std::process::{Command, Stdio}; diff --git a/tests/test_test.rs b/tests/test_test.rs index 6fb0fa99b..4b9a9ff55 100644 --- a/tests/test_test.rs +++ b/tests/test_test.rs @@ -7,7 +7,7 @@ // file that was distributed with this source code. // -use common::util::*; +use crate::common::util::*; #[test] fn test_op_prec_and_or_1() { diff --git a/tests/test_touch.rs b/tests/test_touch.rs index 65190bc39..84263376a 100644 --- a/tests/test_touch.rs +++ b/tests/test_touch.rs @@ -1,9 +1,9 @@ -extern crate uu_touch; -use self::uu_touch::filetime::{self, FileTime}; +extern crate touch; +use self::touch::filetime::{self, FileTime}; extern crate time; -use common::util::*; +use crate::common::util::*; fn get_file_times(at: &AtPath, path: &str) -> (FileTime, FileTime) { let m = at.metadata(path); diff --git a/tests/test_tr.rs b/tests/test_tr.rs index b41ed358f..06cf88ff6 100644 --- a/tests/test_tr.rs +++ b/tests/test_tr.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_toupper() { diff --git a/tests/test_true.rs b/tests/test_true.rs index 66f0c8c4c..1d8622c96 100644 --- a/tests/test_true.rs +++ b/tests/test_true.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_exit_code() { diff --git a/tests/test_truncate.rs b/tests/test_truncate.rs index 11d3dc829..7bb171386 100644 --- a/tests/test_truncate.rs +++ b/tests/test_truncate.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::io::{Seek, SeekFrom, Write}; static TFILE1: &'static str = "truncate_test_1"; diff --git a/tests/test_tsort.rs b/tests/test_tsort.rs index b2c3dc613..c743868ec 100644 --- a/tests/test_tsort.rs +++ b/tests/test_tsort.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_sort_call_graph() { diff --git a/tests/test_uname.rs b/tests/test_uname.rs index 65883ccfc..c0f5632dc 100644 --- a/tests/test_uname.rs +++ b/tests/test_uname.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_uname_compatible() { diff --git a/tests/test_unexpand.rs b/tests/test_unexpand.rs index 00a2d5307..93cc42d90 100644 --- a/tests/test_unexpand.rs +++ b/tests/test_unexpand.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn unexpand_init_0() { diff --git a/tests/test_uniq.rs b/tests/test_uniq.rs index 8713ed7ad..aa2f8a93f 100644 --- a/tests/test_uniq.rs +++ b/tests/test_uniq.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; static INPUT: &'static str = "sorted.txt"; static SKIP_CHARS: &'static str = "skip-chars.txt"; diff --git a/tests/test_unlink.rs b/tests/test_unlink.rs index df7856905..daac6d3b3 100644 --- a/tests/test_unlink.rs +++ b/tests/test_unlink.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_unlink_file() { diff --git a/tests/test_uptime.rs b/tests/test_uptime.rs index b2d5c8a2f..b890ff807 100644 --- a/tests/test_uptime.rs +++ b/tests/test_uptime.rs @@ -1,6 +1,6 @@ extern crate regex; use self::regex::Regex; -use common::util::*; +use crate::common::util::*; #[test] fn test_uptime() { diff --git a/tests/test_users.rs b/tests/test_users.rs index da2e85a79..cb444b8be 100644 --- a/tests/test_users.rs +++ b/tests/test_users.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::env; #[test] diff --git a/tests/test_wc.rs b/tests/test_wc.rs index a0549fe27..43dbbdb15 100644 --- a/tests/test_wc.rs +++ b/tests/test_wc.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; #[test] fn test_stdin_default() { diff --git a/tests/test_who.rs b/tests/test_who.rs index fb667a9ac..89b7cec93 100644 --- a/tests/test_who.rs +++ b/tests/test_who.rs @@ -1,5 +1,5 @@ #[cfg(target_os = "linux")] -use common::util::*; +use crate::common::util::*; #[cfg(target_os = "linux")] #[test] diff --git a/tests/test_whoami.rs b/tests/test_whoami.rs index 1a95f5274..2c64bb067 100644 --- a/tests/test_whoami.rs +++ b/tests/test_whoami.rs @@ -1,4 +1,4 @@ -use common::util::*; +use crate::common::util::*; use std::env; #[test] @@ -27,6 +27,7 @@ fn test_normal() { } #[test] +#[cfg(not(windows))] fn test_normal_compare_id() { let (_, mut ucmd) = at_and_ucmd!(); diff --git a/tests/tests.rs b/tests/tests.rs index 6361178fb..005ee5298 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,8 +1,6 @@ #[macro_use] mod common; -// [warning fix]; from ref: -#[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))] #[allow(unused_imports)] #[cfg(unix)] #[macro_use] diff --git a/util/show-utils.BAT b/util/show-utils.BAT index be7400d3c..9fa5e2ffa 100644 --- a/util/show-utils.BAT +++ b/util/show-utils.BAT @@ -2,14 +2,21 @@ @echo off @rem ::# spell-checker:ignore (CMD) ERRORLEVEL -@rem ::# spell-checker:ignore (utils) cksum dircolors hashsum mkdir mktemp printenv printf readlink realpath relpath rmdir shuf tsort unexpand uutils +@rem ::# spell-checker:ignore (utils) cksum coreutils dircolors hashsum mkdir mktemp printenv printf readlink realpath relpath rmdir shuf tsort unexpand @rem ::# spell-checker:ignore (jq) deps startswith +set "ME=%~0" +set "ME_dir=%~dp0." +set "ME_parent_dir=%~dp0.\.." + @rem refs: , @rem :: default ("Tier 1" cross-platform) utility list set "default_utils=base32 base64 basename cat cksum comm cp cut date dircolors dirname echo env expand expr factor false fmt fold hashsum head join link ln ls mkdir mktemp more mv nl od paste printenv printf ptx pwd readlink realpath relpath rm rmdir seq shred shuf sleep sort split sum tac tail tee test tr true truncate tsort unexpand uniq wc yes" +set "project_dir=%ME_parent_dir%" +cd "%project_dir%" + @:: `jq` available? set "JQ=" set "ERRORLEVEL=" @@ -20,5 +27,6 @@ if NOT DEFINED JQ ( echo WARN: missing `jq` ^(install with `scoop install jq`^)^; falling back to default ^(only fully cross-platform^) util list 1>&2 echo %default_utils% ) else ( - cargo metadata %* --format-version 1 | jq -r "[.resolve.nodes[] | {id: .id, deps: [.deps[].name]}] | .[] | select(.id|startswith(\"uutils\")) | [.deps[] | select(startswith(\"uu_\"))] | [.[] | sub(\"^uu_\"; \"\")] | join(\" \")" + cargo metadata %* --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^^\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")" + REM cargo metadata %* --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^^\\w+\";\"g\")] | [.[].string] | sort | join(\" \")" ) diff --git a/util/show-utils.sh b/util/show-utils.sh index f8f2ac9da..b4a613d9b 100755 --- a/util/show-utils.sh +++ b/util/show-utils.sh @@ -1,13 +1,22 @@ #!/bin/sh -# spell-checker:ignore (utils) cksum dircolors hashsum mkdir mktemp printenv printf readlink realpath relpath rmdir shuf tsort unexpand uutils +# spell-checker:ignore (utils) cksum coreutils dircolors hashsum mkdir mktemp printenv printf readlink realpath relpath rmdir shuf tsort unexpand # spell-checker:ignore (jq) deps startswith +ME="${0}" +ME_dir="$(dirname -- "${ME}")" +ME_parent_dir="$(dirname -- "${ME_dir}")" +ME_parent_dir_abs="$(realpath -mP -- "${ME_parent_dir}")" + # refs: , # default ("Tier 1" cross-platform) utility list default_utils="base32 base64 basename cat cksum comm cp cut date dircolors dirname echo env expand expr factor false fmt fold hashsum head join link ln ls mkdir mktemp more mv nl od paste printenv printf ptx pwd readlink realpath relpath rm rmdir seq shred shuf sleep sort split sum tac tail tee test tr true truncate tsort unexpand uniq wc yes" +project_main_dir="${ME_parent_dir_abs}" +# printf 'project_main_dir="%s"\n' "${project_main_dir}" +cd "${project_main_dir}" + # `jq` available? unset JQ jq --version 1>/dev/null 2>&1 @@ -17,5 +26,6 @@ if [ -z "${JQ}" ]; then echo 'WARN: missing `jq` (install with `sudo apt install jq`); falling back to default (only fully cross-platform) utility list' 1>&2 echo $default_utils else - cargo metadata $* --format-version 1 | jq -r "[.resolve.nodes[] | {id: .id, deps: [.deps[].name]}] | .[] | select(.id|startswith(\"uutils\")) | [.deps[] | select(startswith(\"uu_\"))] | [.[] | sub(\"^uu_\"; \"\")] | join(\" \")" + cargo metadata $* --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string | sub(\"^uu_\"; \"\")] | sort | join(\" \")" + # cargo metadata $* --format-version 1 | jq -r "[.resolve.nodes[] | { id: .id, deps: [.deps[] | { name:.name, pkg:.pkg }] }] | .[] | select(.id|startswith(\"coreutils\")) | [.deps[] | select((.name|startswith(\"uu_\")) or (.pkg|startswith(\"uu_\")))] | [.[].pkg | match(\"^\\\w+\";\"g\")] | [.[].string] | sort | join(\" \")" fi diff --git a/util/test-repo-whitespace.BAT b/util/test-repo-whitespace.BAT index 86fd369a5..c63415295 100644 --- a/util/test-repo-whitespace.BAT +++ b/util/test-repo-whitespace.BAT @@ -8,8 +8,8 @@ :: License: MIT/Apache-2.0 (see https://opensource.org/licenses/Apache-2.0 , https://opensource.org/licenses/MIT) :: * this software is provided for free, WITHOUT ANY EXPRESS OR IMPLIED WARRANTY (see the license for details) +:: spell-checker:ignore (ignore) CTYPE POSIX RETval RETvar akefile makefile makefiles multiline :: spell-checker:ignore (shell/cmd) COMSPEC ERRORLEVEL -:: spell-checker:ignore () CTYPE POSIX Tval Tvar akefile makefile makefiles multiline :config set "_exclude_dir=(?i)[_.#]build|[.]git|[.]gpg|[.]vs|fixtures|vendor"