mirror of
https://github.com/mroi/apple-internals.git
synced 2026-02-12 17:12:44 +00:00
db: collect Info.plist files
This commit is contained in:
11
Makefile
11
Makefile
@@ -1,6 +1,6 @@
|
||||
MY_INTERNALS = $(HOME)/Library/Mobile\ Documents/com~apple~TextEdit/Documents/Apple\ Internals.rtf
|
||||
DB := $(if $(DB),$(DB:.lz=),internals-$(shell sw_vers -productVersion).db)
|
||||
DB_TARGETS = db_files db_binaries db_assets db_services
|
||||
DB_TARGETS = db_files db_binaries db_manifests db_assets db_services
|
||||
CHECK_TARGETS = check_files check_binaries check_services
|
||||
|
||||
.PHONY: all check $(DB_TARGETS) $(CHECK_TARGETS)
|
||||
@@ -106,6 +106,15 @@ db_binaries:: dyld
|
||||
fi ; \
|
||||
done
|
||||
|
||||
db_manifests::
|
||||
printf '\033[1mcollecting Info.plist information...\033[m\n' >&2
|
||||
echo 'DROP TABLE IF EXISTS info;'
|
||||
echo 'CREATE TABLE info (id INTEGER REFERENCES files, plist JSON);'
|
||||
$(call find,-type f -name 'Info.plist') | while read -r os path ; do \
|
||||
test -r "$(call prefix,$$os)$$path" && plutil -convert json "$(call prefix,$$os)$$path" -o - | \
|
||||
sed "/: invalid object/d;s/'/''/g;s|.*|INSERT INTO info $(call file,json('&'));\n|" ; \
|
||||
done
|
||||
|
||||
db_assets::
|
||||
printf '\033[1mcollecting asset catalog information...\033[m\n' >&2
|
||||
echo 'DROP TABLE IF EXISTS assets;'
|
||||
|
||||
Reference in New Issue
Block a user