blob: 0bb29e802f3e1538b383794b99ba9ecde77a408e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env python
import os
import sys
from macholib.MachOStandalone import MachOStandalone
from macholib.util import strip_files
def standaloneApp(path):
if not (os.path.isdir(path) and os.path.exists(os.path.join(path, "Contents"))):
print("%s: %s does not look like an app bundle" % (sys.argv[0], path))
sys.exit(1)
files = MachOStandalone(path).run()
strip_files(files)
def main():
print(
"WARNING: 'macho_standalone' is deprecated, use "
"'python -mmacholib standalone' instead"
)
if not sys.argv[1:]:
raise SystemExit("usage: %s [appbundle ...]" % (sys.argv[0],))
for fn in sys.argv[1:]:
standaloneApp(fn)
if __name__ == "__main__":
main()
|