mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Add clean_pyc.bat (#1527)
* Create clean_pyc.bat Add pyc cleaner script for windows to clear all pyc cache files. https://github.com/Tautulli/Tautulli/issues/1523#issuecomment-944938745 * Update clean_pyc.bat fix comment * Remove __pycache__ folders in clean_pyc scripts Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
This commit is contained in:
parent
14d1ff65f4
commit
22f4b33087
2 changed files with 15 additions and 2 deletions
11
contrib/clean_pyc.bat
Normal file
11
contrib/clean_pyc.bat
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@echo off
|
||||||
|
:: Display information
|
||||||
|
echo This script will remove *.pyc files. These files are generated by Python, but they can cause conflicts after an upgrade. It's safe to remove them, because they will be regenerated.
|
||||||
|
echo Press enter to continue, or CTRL + C to quit.
|
||||||
|
pause
|
||||||
|
|
||||||
|
cd ..\
|
||||||
|
:: Remove *.pyc files
|
||||||
|
del /S *.pyc
|
||||||
|
:: Remove __pycache__ folders
|
||||||
|
for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d"
|
4
contrib/clean_pyc.sh
Executable file → Normal file
4
contrib/clean_pyc.sh
Executable file → Normal file
|
@ -5,5 +5,7 @@ echo "This script will remove *.pyc files. These files are generated by Python,
|
||||||
echo "Press enter to continue, or CTRL + C to quit."
|
echo "Press enter to continue, or CTRL + C to quit."
|
||||||
read
|
read
|
||||||
|
|
||||||
# Remove the *.pyc
|
# Remove *.pyc files
|
||||||
find "`dirname $0`/.." -type f -name "*.pyc" -exec rm -rf {} \;
|
find "`dirname $0`/.." -type f -name "*.pyc" -exec rm -rf {} \;
|
||||||
|
# Remove __pycache__ folders
|
||||||
|
find "`dirname $0`/.." -type d -name "__pycache__" -exec rm -rf {} \;
|
Loading…
Add table
Add a link
Reference in a new issue