diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-04-22 08:55:35 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-04-22 08:55:35 -0700 |
commit | 5d3642b8ef920316693031d2ea34b9def0b1abc5 (patch) | |
tree | 8100890ed5b2e4ecdbde09615e0820346ccc3f41 /sys/cmd/cp | |
parent | e30f8b22069bec1a3fb68f089a9a7198671eb09a (diff) |
chore: rm unfinished projects
Diffstat (limited to 'sys/cmd/cp')
-rw-r--r-- | sys/cmd/cp/cp.c | 75 | ||||
-rw-r--r-- | sys/cmd/cp/rules.mk | 26 |
2 files changed, 0 insertions, 101 deletions
diff --git a/sys/cmd/cp/cp.c b/sys/cmd/cp/cp.c deleted file mode 100644 index dfe2922..0000000 --- a/sys/cmd/cp/cp.c +++ /dev/null @@ -1,75 +0,0 @@ -#include <u.h> -#include <libn.h> - -static struct Flags { - uchar a : 1; - uchar f : 1; - uchar p : 1; - uchar v : 1; - uchar r : 1; -} flag; -static char follow; - -static -int -cp(char *from, char *to) -{ - -} - -/* - * P -> never dereference - * L -> dereference links - * H -> dereference links on the first level - */ -static -void -usage(void) -{ - fputs("usage: cp [-afpv] [-[r|R] [-H | -L | -P]] source ... dest", stderr); - exit(1); -} - -int -main(int argc, char *argv[]) -{ - io·Stat info; - - ARGBEGIN { - case 'a': - follow = 'P'; - flag.a = flag.p = flag.r = 1; - break; - case 'f': - flag.f = 1; - break; - case 'p': - flag.p = 1; - break; - case 'r': - /* fallthrough */ - case 'R': - flag.r = 1; - break; - case 'H': - case 'L': - case 'P': - follow = ARGC(); - break; - default: - usage(); - } ARGEND; - - if (argc < 2) - usage(); - - if (!follow) - follow = flag.r ? 'P' : 'L'; - - if (argc > 2) { - if (stat(argv[argc-1], &info) < 0) - errorf("stat %s: %s", argv[argc-1], strerror(errno)); - if (!S_ISDIR(info.st_mode)) - errorf("%s: is not a directory", argv[argc-1]); - } -} diff --git a/sys/cmd/cp/rules.mk b/sys/cmd/cp/rules.mk deleted file mode 100644 index 500b001..0000000 --- a/sys/cmd/cp/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -include share/push.mk -# Iterate through subdirectory tree - -# Local sources -SRCS_$(d) := -LIBS_$(d) := -BINS_$(d) := -TSTS_$(d) := - -include share/paths.mk - -# Local rules -# $(LIBS_$(d)) = TCFLAGS := -# $(LIBS_$(d)) = TCINCS := -# $(LIBS_$(d)) = TCLIBS := - -$(LIBS_$(d)): $(OBJS_$(d)) - $(ARCHIVE) - -$(BINS_$(d)): $(OBJS_$(d)) - $(LINK) - -$(UNTS_$(d)): $(TOBJS_$(d)) $(LIBS_$(d)) - $(LINK) - -include share/pop.mk |