Skip to content

Commit eb64530

Browse files
committed
Implement shred
1 parent 122284e commit eb64530

File tree

6 files changed

+478
-1
lines changed

6 files changed

+478
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ generic = [
6363
"rm",
6464
"rmdir",
6565
"seq",
66+
"shred",
6667
"shuf",
6768
"sleep",
6869
"sort",
@@ -134,6 +135,7 @@ relpath = { optional=true, path="src/relpath" }
134135
rm = { optional=true, path="src/rm" }
135136
rmdir = { optional=true, path="src/rmdir" }
136137
seq = { optional=true, path="src/seq" }
138+
shred = { optional=true, path="src/shred" }
137139
shuf = { optional=true, path="src/shuf" }
138140
sleep = { optional=true, path="src/sleep" }
139141
sort = { optional=true, path="src/sort" }

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ PROGS := \
7272
rm \
7373
rmdir \
7474
seq \
75+
shred \
7576
shuf \
7677
sleep \
7778
sort \

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ To do
176176
- remove
177177
- runcon
178178
- setuidgid
179-
- shred
180179
- sort (a couple of options implemented)
181180
- split (a couple of missing options)
182181
- stat

src/shred/Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[package]
2+
name = "shred"
3+
version = "0.0.1"
4+
authors = []
5+
6+
[lib]
7+
name = "uu_shred"
8+
path = "shred.rs"
9+
10+
[dependencies]
11+
rand = "0.3"
12+
filetime = "*"
13+
getopts = "*"
14+
libc = "*"
15+
time = "*"
16+
uucore = { path="../uucore" }
17+
18+
[[bin]]
19+
name = "shred"
20+
path = "main.rs"

src/shred/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extern crate uu_shred;
2+
3+
fn main() {
4+
std::process::exit(uu_shred::uumain(std::env::args().collect()));
5+
}

0 commit comments

Comments
 (0)