Last active
October 4, 2015 08:48
-
-
Save meigesir/3489068d2ceb81cd7570 to your computer and use it in GitHub Desktop.
iterate all dir under current dir: class dump to dir truncating suffix ".framework"
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/sh | |
list_alldir(){ | |
for file2 in `ls -a $1` | |
do | |
if [ x"$file2" != x"." -a x"$file2" != x".." ];then | |
if [ -d "$1/$file2" ];then | |
echo "$1/$file2" | |
list_alldir "$1/$file2" | |
elif [ -f "$1/$file2" ];then | |
// if uplevel dir name contains framework | |
if [[ $1 == *".framework" ]];then | |
// file: to execute | |
echo "$1/$file2" | |
echo ${1%%.framework} | |
// class dump to dir truncating suffix ".framework" | |
`class-dump -S -s -H "$1/$file2" -o ${1%%.framework}` | |
fi | |
fi | |
fi | |
done | |
} | |
list_alldir . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment