Last active
August 29, 2015 14:17
-
-
Save ntpeters/0a51f6c1ac843d47800b to your computer and use it in GitHub Desktop.
Executes wildcard make targets based on file extension
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
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