Skip to content

Instantly share code, notes, and snippets.

@walterebert
Last active May 9, 2019 10:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walterebert/435509da214a0a07c8f6597ab831fa08 to your computer and use it in GitHub Desktop.
Save walterebert/435509da214a0a07c8f6597ab831fa08 to your computer and use it in GitHub Desktop.
Unzip & clean Elmastudio WordPress theme bundle
#!/bin/bash
# Unzip theme bundle
unzip elmastudio-themebundle.zip
# Delete MacOS directory
rm -fr __MACOSX
# Unzip theme files
cd elmastudio-themebundle
find . -name '*.zip' -exec unzip {} \;
# Delete MacOS directories recursively
find . -type d -name '__MACOSX' -exec rm -fr {} \;
# Delete .DS_Store files recursively
find . -type f -name '.DS_Store' -exec rm {} \;
# Delete theme zip files
rm -f *.zip
# Finished
cd ..
printf "Done!\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment