mirror of
git://git.suckless.org/sbase
synced 2024-12-24 07:53:08 +00:00
19 lines
316 B
C
19 lines
316 B
C
/* See LICENSE file for copyright and license details. */
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
|
|
#include "../fs.h"
|
|
#include "../util.h"
|
|
|
|
bool rm_fflag = false, rm_rflag = false;
|
|
|
|
void
|
|
rm(const char *path)
|
|
{
|
|
if(rm_rflag)
|
|
recurse(path, rm);
|
|
if(remove(path) == -1 && !rm_fflag)
|
|
eprintf("remove %s:", path);
|
|
}
|
|
|