1
0
mirror of git://git.suckless.org/sbase synced 2024-12-23 15:34:38 +00:00
sbase/rmdir.c

29 lines
363 B
C
Raw Normal View History

2013-06-09 13:20:55 +00:00
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include "util.h"
static void
usage(void)
{
eprintf("usage: rmdir dir...\n");
}
int
main(int argc, char **argv)
{
argv++;;
if(!*argv)
usage();
while(*argv) {
if(rmdir(*argv++) == -1)
fprintf(stderr, "rmdir: '%s': %s\n",
argv[-1], strerror(errno));
}
return 0;
}