2015-09-14 08:02:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
main() {
|
|
|
|
check_class_dump
|
|
|
|
extract_private_framework_headers "CommerceKit"
|
|
|
|
extract_private_framework_headers "StoreFoundation"
|
|
|
|
}
|
|
|
|
|
|
|
|
check_class_dump() {
|
|
|
|
which class-dump >/dev/null
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "'class-dump' is not installed" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
extract_private_framework_headers() {
|
|
|
|
local framework_name="$1"; shift
|
2016-02-06 12:00:20 +00:00
|
|
|
local directory="mas-cli/PrivateHeaders/${framework_name}"
|
2015-09-14 08:02:40 +00:00
|
|
|
mkdir -p "$directory"
|
|
|
|
class-dump -Ho "$directory" "/System/Library/PrivateFrameworks/${framework_name}.framework"
|
|
|
|
}
|
|
|
|
|
|
|
|
main
|