-
Notifications
You must be signed in to change notification settings - Fork 0
/
unbuild
executable file
·23 lines (19 loc) · 888 Bytes
/
unbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# modular-json Unbuild Script
# To be used to delete the directories & files created by `python setup.py bdist_wheel`.
# Author : Jordan Welsman
# Copyright : Jordan Welsman
echo "You are about to delete files & folders from jutils."
echo "These files are crucial to the ability to install and import jutils."
read -p "Do you want to continue? [Y/n]: "
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf build # remove build directory if exists
rm -rf dist # remove distribution directory if exists
find . -name __pycache__ -type d -print0|xargs -0 rm -r -- # remove all pycache directories
find . -name .pytest_cache -type d -print0|xargs -0 rm -r -- # remove all pytest cache directories
find . -name openjson.egg-info -type d -print0|xargs -0 rm -r -- # remove all egg-info directories
echo "Project successfully unbuilt."
else
echo "Operation aborted."
fi