mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
Simplify script/update_headers
.
Partial #638 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
53958a40c5
commit
b96a0a71ba
1 changed files with 7 additions and 15 deletions
|
@ -13,26 +13,18 @@ if ! cd -- "${mas_dir}"; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
main() {
|
||||
check_class_dump
|
||||
extract_private_framework_headers CommerceKit
|
||||
extract_private_framework_headers StoreFoundation
|
||||
}
|
||||
|
||||
check_class_dump() {
|
||||
if ! command -v class-dump; then
|
||||
echo 'class-dump is not installed.' >&2
|
||||
echo 'Download from http://stevenygard.com/projects/class-dump/' >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
if ! command -v class-dump; then
|
||||
echo 'class-dump is not installed.' >&2
|
||||
echo 'Download from http://stevenygard.com/projects/class-dump/' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
extract_private_framework_headers() {
|
||||
local framework_name="${1}"
|
||||
shift
|
||||
local directory="Sources/PrivateFrameworks/${framework_name}"
|
||||
mkdir -p "${directory}"
|
||||
class-dump -Ho "${directory}" "/System/Library/PrivateFrameworks/${framework_name}.framework"
|
||||
}
|
||||
|
||||
main
|
||||
extract_private_framework_headers CommerceKit
|
||||
extract_private_framework_headers StoreFoundation
|
||||
|
|
Loading…
Reference in a new issue