Created
August 16, 2020 22:52
-
-
Save dlagg/a16e5ee99a4531c08a62d9b6ccb71041 to your computer and use it in GitHub Desktop.
Simple zsh script that cleans your pyinstalive download folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
pyinstalive -o | |
rm -rf *_live_downloads #Clean tmp dirs | |
dirs=(*/) #list directories and store in array | |
#loop through dirs moving it's log & json files inside them. | |
for d in $dirs; do | |
cleanD="${d%?}" | |
mkdir $cleanD/txt 2>/dev/null | |
find . -maxdepth 1 -type f -name "*$cleanD*" -exec mv -t "$cleanD/txt" {} + | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment