mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 19:43:09 +00:00
24 lines
538 B
Bash
Executable file
24 lines
538 B
Bash
Executable file
#!/bin/bash
|
|
|
|
main() {
|
|
check_class_dump
|
|
extract_private_framework_headers "CommerceKit"
|
|
extract_private_framework_headers "StoreFoundation"
|
|
}
|
|
|
|
check_class_dump() {
|
|
|
|
if command --quiet --search class-dump; then
|
|
echo "'class-dump' is not installed" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
extract_private_framework_headers() {
|
|
local framework_name="$1"; shift
|
|
local directory="App/PrivateHeaders/${framework_name}"
|
|
mkdir -p "$directory"
|
|
class-dump -Ho "$directory" "/System/Library/PrivateFrameworks/${framework_name}.framework"
|
|
}
|
|
|
|
main
|