diff options
Diffstat (limited to 'pkg/default.flat.zip.do')
-rwxr-xr-x | pkg/default.flat.zip.do | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/default.flat.zip.do b/pkg/default.flat.zip.do new file mode 100755 index 0000000..8373faf --- /dev/null +++ b/pkg/default.flat.zip.do @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e +src=${1%.flat.zip}.aar +redo-ifchange ../.vars.rc "$src" +. ../.vars.rc +redo-ifchange "$BUILD_TOOLS/aapt2" +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT +mkdir -p "$tmp/res" +7z x -tzip -o"$tmp" "$src" res >/dev/null +"$BUILD_TOOLS/aapt2" compile --dir "$tmp/res" -o "$3" +# vim:ft=bash |