Skip to content

Instantly share code, notes, and snippets.

@adrianoc
Last active June 2, 2023 18:25
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 adrianoc/240d51bdd27cee5e153f8f6b6f7b8e41 to your computer and use it in GitHub Desktop.
Save adrianoc/240d51bdd27cee5e153f8f6b6f7b8e41 to your computer and use it in GitHub Desktop.
Remove any non script related asset from current (and child) directory
#!/bin/bash
IFS=' ' read -ra FILEEXTS <<< "*.tga *.psd *.wav *.exr *.ttf *.jpg *.png *.fbx *.mp3 *.mp4 *.shader *.shadergraph *.mat *.playable *.controller *.prefab *.unity *.cubemap *.anim *.asset *.hdr *.dds *.max *.mesh *.vfx *.brush *.inputactions *.mixer *.overrideController *.shadersubgraph *.shadervariants *.swatch *.terrainlayer *.tpsheet *.txt *.blend *.bmp *.tif *.blend1"
for FILE_EXT in "${FILEEXTS[@]}"; do
echo $FILE_EXT
find . -iname "$FILE_EXT" -exec rm -rf {} \;
find . -iname "$FILE_EXT.meta" -exec rm -rf {} \;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment