summaryrefslogtreecommitdiff
path: root/src/skaembutils/s6-hiercopy.c
blob: 9ba3fd52c5876887ea4c1b41ed92a66584f35976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 ;
}