diff --git a/Cargo.lock b/Cargo.lock index b51221d..76d8fe4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,33 +34,9 @@ name = "coreutils" version = "0.0.1" dependencies = [ "arg 0.1.0", - "exit-no-std", "sysexits", ] -[[package]] -name = "exit-no-std" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a608ccc67fac78c1916aa88ad75d6f6a3e353521844abce906c22a45d161d99" -dependencies = [ - "libc", - "pc-ints", - "winapi", -] - -[[package]] -name = "libc" -version = "0.2.138" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" - -[[package]] -name = "pc-ints" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422b0cc3a966f6e0987d2f948c234585bd917a1f16df1470e60c56ad6de2c085" - [[package]] name = "proc-macro2" version = "1.0.47" @@ -116,25 +92,3 @@ name = "unicode-width" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/arg/Cargo.lock b/arg/Cargo.lock index 257fed8..5e976e0 100644 --- a/arg/Cargo.lock +++ b/arg/Cargo.lock @@ -2,6 +2,13 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "arg" +version = "0.1.0" +dependencies = [ + "arg 0.3.1", +] + [[package]] name = "arg" version = "0.3.1" @@ -22,13 +29,6 @@ dependencies = [ "tabwriter", ] -[[package]] -name = "arg-dynamic" -version = "0.1.0" -dependencies = [ - "arg", -] - [[package]] name = "proc-macro2" version = "1.0.47" diff --git a/arg/src/lib.rs b/arg/src/lib.rs index 32873cb..13564b5 100644 --- a/arg/src/lib.rs +++ b/arg/src/lib.rs @@ -1 +1,20 @@ +// Copyright (c) 2022 YAC +// SPDX-License-Identifier: AGPL-3.0-or-later + +/* This file is part of YAC coreutils. + * + * YAC coreutils is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * YAC coreutils is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + pub use arg::*; diff --git a/build.sh b/build.sh index 449b4aa..c01e26c 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,24 @@ #!/bin/sh -cargo build --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu +# Copyright (c) 2022 YAC +# SPDX-License-Identifier: AGPL-3.0-or-later + +# This file is part of YAC coreutils. +# +# YAC coreutils is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# YAC coreutils is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more +# details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see https://www.gnu.org/licenses/. + +cargo build --release \ + -Z build-std=std,panic_abort \ + -Z build-std-features=panic_immediate_abort \ + --target x86_64-unknown-linux-gnu diff --git a/src/cat.rs b/src/cat.rs index a5b3d8a..dd1e646 100644 --- a/src/cat.rs +++ b/src/cat.rs @@ -1,6 +1,22 @@ -// Copyright (c) 2022 Emma Tebibyte +// Copyright (c) 2022 YAC // SPDX-License-Identifier: AGPL-3.0-or-later +/* This file is part of YAC coreutils. + * + * YAC coreutils is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * YAC coreutils is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more + * details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + use std::env; use std::fs::{File, read_to_string}; use std::io;