From 93599c51c5fb2b7e449941c36491008e9476d8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B4=E5=AF=92?= Date: Wed, 6 Aug 2014 22:29:05 +0800 Subject: [PATCH] add argument options for xUnique --- README.md | 6 +++++- xUnique.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1ac1f60..25942bb 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,11 @@ As you may know, the [`UUID`](http://www.ietf.org/rfc/rfc4122.txt) generated by 4. In all your branches, uniquify `project.pbxproj` file in either way: * make some changes and commit. Try to push, git hook would be triggered * manually run script: `python path/to/xUnique.py path/to/MyProject.xcodeproj` and then committing changes. -5. All Done;) +5. If you want to use part of xUnique functions, use below options in arguments: + * `-v`: print verbose output + * `-u`: uniquify project file, that is, replace UUID to MD5 digest + * `-s`: sort project file inlcuding `children` list, `files` list, `PBXFileReference` list and `PBXBuildFile` + * if neither `-u` nor `-s` exists, execute both uniquify and sort ### Examples ------------ diff --git a/xUnique.py b/xUnique.py index 5f46ad1..abab268 100755 --- a/xUnique.py +++ b/xUnique.py @@ -388,7 +388,7 @@ def __unique_build_file(self, parent_hex, build_file_hex): def main(sys_args): - usage = "usage: %prog [[-u|--unique]|[-s|--sort (24|32)]] path/to/Project.xcodeproj" + usage = "usage: %prog [-v|-verbose][-u|--unique][-s|--sort] path/to/Project.xcodeproj" description = "By default, without any option, xUnique uniquify and sort the project file." parser = OptionParser(usage=usage, description=description) parser.add_option("-v", "--verbose",