zip2zip: Support sorting globbed arguments, '**'
When '-s' is passed, any globbed arguments will have their results
sorted. When there are multiple arguments, the files will still be
inserted in argument order.
A bare '**' is now special cased to mean every file in the input zip.
This allows zip2zip to sort entire zip files efficiently by using
`zip2zip -s -i <> -o <> '**'`. This can be useful if your original zip
program used filesystem ordering which was not reproducible.
Test: m -j blueprint_tools (new tests pass)
Change-Id: Ic3512c5fe14c94c6f3e134296905121d2ff8b58a
diff --git a/cmd/zip2zip/Android.bp b/cmd/zip2zip/Android.bp
index 8cac003..476be4f 100644
--- a/cmd/zip2zip/Android.bp
+++ b/cmd/zip2zip/Android.bp
@@ -18,5 +18,6 @@
srcs: [
"zip2zip.go",
],
+ testSrcs: ["zip2zip_test.go"],
}