diff options
Diffstat (limited to 'src/skaembutils/s6-hiercopy.c')
-rw-r--r-- | src/skaembutils/s6-hiercopy.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/skaembutils/s6-hiercopy.c b/src/skaembutils/s6-hiercopy.c new file mode 100644 index 0000000..9ba3fd5 --- /dev/null +++ b/src/skaembutils/s6-hiercopy.c @@ -0,0 +1,17 @@ +/* ISC license. */ + +#include <sys/stat.h> +#include <skalibs/strerr2.h> +#include <skalibs/djbunix.h> + +#define USAGE "s6-hiercopy src dst" + +int main (int argc, char const *const *argv) +{ + PROG = "s6-hiercopy" ; + if (argc < 3) strerr_dieusage(100, USAGE) ; + umask(0) ; + if (!hiercopy(argv[1], argv[2])) + strerr_diefu4sys(111, "copy hierarchy from ", argv[1], " to ", argv[2]) ; + return 0 ; +} |