Skip to content

Instantly share code, notes, and snippets.

@meigesir
Last active October 4, 2015 08:48
Show Gist options
  • Save meigesir/3489068d2ceb81cd7570 to your computer and use it in GitHub Desktop.
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"
#!/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