aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/xcode
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-06-24 22:13:27 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-06-27 11:39:58 +0000
commit6aa2b71839969f38200ef3e75cba18d812a47c15 (patch)
treecdb8a6dbfd0924c645419dd8bd516991a7ac5ec7 /src/tools/xcode
parentdbe55c1f90b16b11bd75baea1f75d03918209d16 (diff)
Speed up resetting file/directory dates to zip epoch by 100x.
It is better to use the {} + as it passes the file list to touch instead of calling touch command once for each file. This will reduce the number of times touch process is created and massively speed up the script From man page -exec utility [argument ...] {} + Same as -exec, except that ``{}'' is replaced with as many pathnames as possible for each invocation of utility. This behaviour is similar to that of xargs(1). -- MOS_MIGRATED_REVID=125821677
Diffstat (limited to 'src/tools/xcode')
-rwxr-xr-xsrc/tools/xcode/actoolwrapper/actoolwrapper.sh2
-rwxr-xr-xsrc/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh2
-rwxr-xr-xsrc/tools/xcode/momcwrapper/momcwrapper.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/xcode/actoolwrapper/actoolwrapper.sh b/src/tools/xcode/actoolwrapper/actoolwrapper.sh
index 9426a644e3..1a55ac1a15 100755
--- a/src/tools/xcode/actoolwrapper/actoolwrapper.sh
+++ b/src/tools/xcode/actoolwrapper/actoolwrapper.sh
@@ -71,7 +71,7 @@ done
pushd "$TEMPDIR" > /dev/null
# Reset all dates to Zip Epoch so that two identical zips created at different
# times appear the exact same for comparison purposes.
-find . -exec touch -h -t 198001010000 {} \;
+find . -exec touch -h -t 198001010000 {} \+
# Added include "*" to fix case where we may want an empty zip file because
# there is no data.
diff --git a/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh b/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh
index 8e3d53d937..26cc214ad8 100755
--- a/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh
+++ b/src/tools/xcode/ibtoolwrapper/ibtoolwrapper.sh
@@ -69,7 +69,7 @@ done
pushd "$TEMPDIR" > /dev/null
# Reset all dates to Zip Epoch so that two identical zips created at different
# times appear the exact same for comparison purposes.
-find . -exec touch -h -t 198001010000 {} \;
+find . -exec touch -h -t 198001010000 {} \+
# Added include "*" to fix case where we may want an empty zip file because
# there is no data.
diff --git a/src/tools/xcode/momcwrapper/momcwrapper.sh b/src/tools/xcode/momcwrapper/momcwrapper.sh
index 5e926034b7..04c9e24537 100755
--- a/src/tools/xcode/momcwrapper/momcwrapper.sh
+++ b/src/tools/xcode/momcwrapper/momcwrapper.sh
@@ -39,7 +39,7 @@ $WRAPPER momc "$@" "$TEMPDIR/$NAME"
pushd "$TEMPDIR" > /dev/null
# Reset all dates to Zip Epoch so that two identical zips created at different
# times appear the exact same for comparison purposes.
-find . -exec touch -h -t 198001010000 {} \;
+find . -exec touch -h -t 198001010000 {} \+
# Added include "*" to fix case where we may want an empty zip file because
# there is no data.