https://github.com/cube707/python-makeclean
A clean-up utility in python that removes files and folders. It is meant as a portable replacement for `rm -r` in `clean:` targets of makefiles, but can be used for other similar situations.
https://github.com/cube707/python-makeclean
Last synced: 2 months ago
JSON representation
A clean-up utility in python that removes files and folders. It is meant as a portable replacement for `rm -r` in `clean:` targets of makefiles, but can be used for other similar situations.
- Host: GitHub
- URL: https://github.com/cube707/python-makeclean
- Owner: Cube707
- License: mit
- Created: 2022-08-19T15:58:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T19:53:03.000Z (about 2 years ago)
- Last Synced: 2025-04-04T08:47:42.082Z (2 months ago)
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# makeclean.py
A clean-up utility in python that removes files and folders. It is meant as a portable replacement for `rm -r` in `clean:` targets of makefiles, but
can be used for other similar situations.It accepts an arbitrary number of path-objects and removes them if they exist, while ignoring non-existent ones.
## Install
Currently, the package is not release, so you have to install it from the repo.
Install via pip:
```bash
pip install git+https://github.com/Cube707/python-makeclean
```## Usage
You can use it directly from the terminal:
```bash
makeclean foo.txt bar/
```But it gets really helpful if you use it as the `clean:` target of a makefile, making it fully portable:
```makefile
TRASH = foo.txt bar/clean:
makeclean $(TRASH)
```Use `makeclean --help` for more details.
---
*Copyright 2022 Jan Wille*