mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 21:45:10 +01:00
Clean project from orphan swap/bytecode files
This commit is contained in:
12
bin/clean_project
Executable file
12
bin/clean_project
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
read -p "Close vim and stop running (Python) processes. Type 'c' to continue after doing so, any other key to abort. " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Cc]$ ]]
|
||||
then
|
||||
# do semi-dangerous stuff
|
||||
find . -name "*.pyc" -type f -delete
|
||||
find . -name "*.swp" -type f -delete
|
||||
find . -name "*.swo" -type f -delete
|
||||
else
|
||||
echo "aborted"
|
||||
fi
|
||||
Reference in New Issue
Block a user