Last active
August 26, 2016 07:30
-
-
Save kaneta1992/64a23d19de18d1cc6a88528a8a061dec to your computer and use it in GitHub Desktop.
シェーダーの依存ファイルを調べたかった時に書いた
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
#!/bin/bash | |
IFS=$'\n' | |
declare -a KNOWN_LIST=() | |
function func() { | |
echo "${KNOWN_LIST[*]}" | grep $1 > /dev/null && return | |
KNOWN_LIST+=($1) | |
echo $1 | |
for filename in $(cat $1 | grep "#include" | sed 's/'\''/"/g;' | cut -d'"' -f2); do | |
func $(echo $filename) | |
done | |
} | |
func $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment