about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/skaembutils/deps-exe/s6-hiercopy1
-rw-r--r--src/skaembutils/s6-hiercopy.c17
2 files changed, 18 insertions, 0 deletions
diff --git a/src/skaembutils/deps-exe/s6-hiercopy b/src/skaembutils/deps-exe/s6-hiercopy
new file mode 100644
index 0000000..e7187fe
--- /dev/null
+++ b/src/skaembutils/deps-exe/s6-hiercopy
@@ -0,0 +1 @@
+-lskarnet
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 ;
+}