Skip to content

Instantly share code, notes, and snippets.

@ntpeters
Last active August 29, 2015 14:17
Show Gist options
  • Save ntpeters/0a51f6c1ac843d47800b to your computer and use it in GitHub Desktop.
Save ntpeters/0a51f6c1ac843d47800b to your computer and use it in GitHub Desktop.
Executes wildcard make targets based on file extension
for file in $(find . -iregex '.*\(wav\|scss\|svg\)' -printf '%f\0'); do
extension=$(cut -d '.' -f 2)
case "$extension" in
wav)
make "${file}.mp3"
make "${file}.ogg"
;;
scss)
make "${file}.css"
;;
svg)
make "${file}.png"
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment