mirror of
git://git.suckless.org/sbase
synced 2024-12-23 15:34:38 +00:00
31 lines
452 B
C
31 lines
452 B
C
/* See LICENSE file for copyright and license details. */
|
|
#include <stdio.h>
|
|
#include <stdlib.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 EXIT_SUCCESS;
|
|
}
|
|
|