debian/rules: Use `git' potty wrapper.
[qmail] / maildirmake.c
CommitLineData
212b6f5d 1#include "strerr.h"
2117e02e
MW
2#include "exit.h"
3
212b6f5d 4#define FATAL "maildirmake: fatal: "
2117e02e
MW
5
6void main(argc,argv)
7int argc;
8char **argv;
9{
212b6f5d
MW
10 umask(077);
11 if (!argv[1])
12 strerr_die1x(100,"maildirmake: usage: maildirmake name");
13 if (mkdir(argv[1],0700) == -1)
14 strerr_die4sys(111,FATAL,"unable to mkdir ",argv[1],": ");
15 if (chdir(argv[1]) == -1)
16 strerr_die4sys(111,FATAL,"unable to chdir to ",argv[1],": ");
17 if (mkdir("tmp",0700) == -1)
18 strerr_die4sys(111,FATAL,"unable to mkdir ",argv[1],"/tmp: ");
19 if (mkdir("new",0700) == -1)
20 strerr_die4sys(111,FATAL,"unable to mkdir ",argv[1],"/new: ");
21 if (mkdir("cur",0700) == -1)
22 strerr_die4sys(111,FATAL,"unable to mkdir ",argv[1],"/cur: ");
23 _exit(0);
2117e02e 24}