about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-02-23 23:28:58 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-02-23 23:28:58 +0000
commitfe1f70d5f729e331facf481ec45cc1c64e095d85 (patch)
tree54ecbfa97635cf15f1e7b1cbd8eae33939ad1747 /src
parent1a193920ece5297d8676afef5b1e69e785522ad3 (diff)
downloads6-portable-utils-fe1f70d5f729e331facf481ec45cc1c64e095d85.tar.gz
s6-portable-utils-fe1f70d5f729e331facf481ec45cc1c64e095d85.tar.xz
s6-portable-utils-fe1f70d5f729e331facf481ec45cc1c64e095d85.zip
Add s6-hiercopy (based on skalibs) v2.0.2.0
 Version: rc for 2.0.2.0
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 ;
+}