Skip to content

Instantly share code, notes, and snippets.

@dlagg
Created August 16, 2020 22:52
Show Gist options
  • Save dlagg/a16e5ee99a4531c08a62d9b6ccb71041 to your computer and use it in GitHub Desktop.
Save dlagg/a16e5ee99a4531c08a62d9b6ccb71041 to your computer and use it in GitHub Desktop.
Simple zsh script that cleans your pyinstalive download folder.
#!/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