Merge "Don't use the same temp directory to uncompress dex"

This commit is contained in:
Treehugger Robot 2018-02-09 07:22:24 +00:00 committed by Gerrit Code Review
commit 9963b1af06
1 changed files with 5 additions and 4 deletions

View File

@ -2601,11 +2601,12 @@ endef
#
define uncompress-dexs
$(hide) if (zipinfo $@ '*.dex' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then \
rm -rf $(dir $@)uncompresseddexs && mkdir $(dir $@)uncompresseddexs; \
unzip -q $@ '*.dex' -d $(dir $@)uncompresseddexs && \
tmpdir=$@.tmpdir; \
rm -rf $$tmpdir && mkdir $$tmpdir; \
unzip -q $@ '*.dex' -d $$tmpdir && \
zip -qd $@ '*.dex' && \
( cd $(dir $@)uncompresseddexs && find . -type f | sort | zip -qD -X -0 ../$(notdir $@) -@ ) && \
rm -rf $(dir $@)uncompresseddexs; \
( cd $$tmpdir && find . -type f | sort | zip -qD -X -0 ../$(notdir $@) -@ ) && \
rm -rf $$tmpdir; \
fi
endef