Commit graph

52 commits

Author SHA1 Message Date
Ian Douglas Scott
99af79a7fa
Cast umask result, and comment about Redox 2017-07-23 17:28:16 -07:00
Ian Douglas Scott
d8494974bc
Make chmod use std where possible instead of libc; compile for Redox 2017-07-22 20:46:15 -07:00
Joshua Miller
e8073d2596 pin dependencies 2017-07-15 15:16:09 -05:00
Nathan Ross
36503a77c7 impl: use coreopts for brevity and consistent UX 2016-08-20 10:07:24 -04:00
Knight
7423c5e644 chmod: fix #831 2016-06-19 22:52:56 +08:00
Luca Ottaviano
6ded76714b chmod: remove unused dependencies 2016-04-02 10:29:57 +02:00
Luca Ottaviano
2686ea75d7 chmod: handle -octal and -[rwx]
The main issue is that -octal or -[rwx] is interpreted as an option by
getopts.
Search the args for such a pattern, remove it before parsing and
manually handle it afterwards.
Fixes #788.
2016-04-02 10:29:57 +02:00
Luca Ottaviano
5dc0a55630 chmod: fix reference option
Reference option must have a file path.
Fix C interface using CString.
Better error message if the file doesn't exist.
2016-03-10 20:34:49 +01:00
Arcterus
d9ad0b185a tests: fix tests that were failing on OS X 2016-01-10 00:09:05 -08:00
Alex Lyon
027e02db8b Merge pull request #793 from ebfe/clippy
Fix clippy warnings
2016-01-06 00:56:07 -08:00
Michael Gehring
a2944e06db Fix clippy warnings 2016-01-06 09:36:20 +01:00
Arcterus
bc40f93f7e chmod: implement --verbose, --changes, and --quiet 2016-01-05 14:08:24 -08:00
Arcterus
ee669ab55b chmod: rewrite mode parser 2016-01-04 20:00:34 -08:00
Arcterus
96817dfbc5 Fix #784 2016-01-03 23:15:19 -08:00
Michael Gehring
ab0639d88a Fix arm build
Fixes #719
2015-12-19 08:53:28 +01:00
Joseph Crail
8fa09b2004 Remove trait shim needed before Path stabilized
Now that Path has stabilized in Rust 1.5, I removed the UUPathExt trait
needed to support stable, beta, and nightly.
2015-12-10 14:20:01 -05:00
Joseph Crail
b90d253584 Refactor and simplify build for utilities.
For coreutils, there are two build artifacts:

  1. multicall executable (each utility is a separate static library)
  2. individual utilities (still separate library with main wrapper)

To avoid namespace collision, each utility crate is defined as
"uu_{CMD}". The end user only sees the original utility name. This
simplifies build.rs.

Also, the thin wrapper for the main() function is no longer contained in
the crate. It has been separated into a dedicated file. This was
necessary to work around Cargo's need for the crate name attribute to
match the name in the respective Cargo.toml.
2015-12-07 21:56:45 -05:00
Michael Gehring
ca16e66a55 switch to cargo version numbers 2015-11-25 10:58:49 +01:00
Joseph Crail
ca1074201f Split utility files into separate library.
Everything in src/common has been moved to src/uucore. This is defined
as a Cargo library, instead of directly included. This gives us
flexibility to make the library an external crate in the future.

Fixes #717.
2015-11-24 22:20:27 -05:00
Nathan Ross
502957dc3e use cargo idioms to manage dependency resolution and compilation 2015-11-23 02:04:15 -05:00
Carlos Liam
87d14978e9 Clean whitespace
Remove leading newlines and replace lines containing only whitespace
with empty lines
2015-10-06 12:04:46 -04:00
Michael Gehring
9d8abbcb06 Basic Cargo build
Builds the uutils multicall binary containing all utils (except stdbuf)
by default. To only build a subset
    `cargo --no-default-features --features <utils>`
can be used.

Whats missing is building the standalone binaries and a mechanism to
automatically disable the build of unix only utils on windows.
2015-08-28 21:12:30 +02:00
Joseph Crail
f41d5b3f8f Replace unstable fs:walk_dir() w/ external crate. 2015-07-31 16:21:06 -04:00
Joseph Crail
f03b22a65c Stabilize several PathExt methods. 2015-07-31 16:21:06 -04:00
Peter Atashian
47f82f0de2 Various Windows fixes
Improve handling of unicode on Windows
Disable a few crates on Windows that abuse unix APIs too much

Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-19 20:25:48 -04:00
Joseph Crail
690a483a8a Update to nightly build.
I updated the library dependencies, features, and deprecated methods.
2015-06-23 23:00:00 -04:00
Joseph Crail
1be9c41105 Upgrade regex cargo. 2015-05-29 00:50:32 -04:00
Joseph Crail
28e00cbd78 Standardize display of utility name and version. 2015-05-25 14:50:15 -04:00
Joseph Crail
b4b08de42c Switch to external getopts cargo (part 1).
I switched over to the getopts crate on crates.io, instead of Rust's
private implementation. This will allow coreutils to build for Rust 1.0.

I'm splitting the updates into several commits for better reviewing.
2015-05-20 22:47:30 -04:00
Joseph Crail
a94bd0bd35 Remove unstable regex macros.
This will allow coreutils to get further along when building against
Rust 1.0.
2015-05-19 21:40:03 -04:00
kwantam
06f1b38c91 update chmod for latest stdlib changes 2015-04-26 16:12:19 -04:00
Camille TJHOA
d990efff83 chmod new_io 2015-04-26 20:03:37 +02:00
kwantam
d4f39e1638 dependency builds use Cargo
With this change, individual submodules can specify their dependencies with
an additional file called "deps.mk" in the subdir. When building, only
the dependencies that are necessary are built, using cargo, and then linked.

This greatly simplifies adding new dependencies: add the package in
deps/Cargo.toml, and add the appropriate line in "deps.mk" in the
src/utilname/ directory, and the dependency will be built automatically
as needed.

This also removes the need to use git submodules.
2015-04-25 22:18:03 -04:00
Michael Gehring
eb6594cc91 CString::from_slice -> CString::new 2015-02-22 13:59:57 +01:00
Michael Gehring
9ae9a48387 feature io -> old_io, path -> old_path 2015-02-22 13:59:12 +01:00
Michael Gehring
e7b647171f os::set_exit_status(isize) -> env::set_exit_status(i32) 2015-02-22 13:59:12 +01:00
Michael Gehring
e78900e56a new plugin attribute syntax 2015-02-13 16:45:01 +01:00
Michael Gehring
d3ff46d0c7 Drop deprecated 'libc' feature flag 2015-02-06 14:10:07 +01:00
Michael Gehring
3eb5a814a3 Fix most unstable feature warnings 2015-02-03 23:54:37 +01:00
Michael Gehring
d187dc574b std::io -> std::old_io 2015-01-29 08:45:37 +01:00
Michael Gehring
fbdf04c072 Replace deprecated slice_{to,from} with slicing syntax 2015-01-24 10:46:28 +01:00
Michael Gehring
6aef8cc38c Don't link to regex_macros 2015-01-10 20:44:56 +01:00
Michael Gehring
4d6cbfa393 Disable unstable warnings for now 2015-01-10 20:44:56 +01:00
Arcterus
a12fd89cb2 chmod, chroot, comm: fix build 2015-01-09 16:51:51 -08:00
Michael Gehring
1b381f49fa Use new macro feature flags/attributes 2015-01-08 14:50:02 +01:00
Haitao Li
872bb0010a regex::Captures::{at,name} returns Option 2014-12-22 10:54:29 +11:00
Michael Gehring
ab344d8e7c remove references to the native crate 2014-11-22 07:30:18 +01:00
Michael Gehring
92093644bb chmod: fix build on freebsd 2014-11-20 20:36:50 +01:00
Michael Gehring
09f223fdb1 Update for new coercion rules 2014-11-19 21:58:16 +01:00
Arcterus
a672f5c768 chmod: update for latest Rust 2014-11-10 20:11:48 -08:00