diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-07-08 16:36:54 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2010-07-08 16:36:54 -0700 |
commit | f5f11eb01c7f2ea82e5cd91824bf4e053d4dfd69 (patch) | |
tree | 8fd33f94d5377ee4ab909846baf771fd29270281 | |
parent | 68f9303c90253f5149e4bfe323f9ee77fdf4b380 (diff) | |
parent | 69ef5ce4f0e0adfac1ff12f8cc3dde65fab36486 (diff) | |
download | build-f5f11eb01c7f2ea82e5cd91824bf4e053d4dfd69.zip build-f5f11eb01c7f2ea82e5cd91824bf4e053d4dfd69.tar.gz build-f5f11eb01c7f2ea82e5cd91824bf4e053d4dfd69.tar.bz2 |
Merge "Create systemtarball either with bz2 or gz"
-rw-r--r-- | core/Makefile | 6 | ||||
-rwxr-xr-x | tools/mktarball.sh | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/core/Makefile b/core/Makefile index 628a8de..a2b9391 100644 --- a/core/Makefile +++ b/core/Makefile @@ -720,8 +720,12 @@ define build-systemtarball-target $(INSTALLED_SYSTEMTARBALL_TARGET) endef +ifndef SYSTEM_TARBALL_FORMAT + SYSTEM_TARBALL_FORMAT := bz2 +endif + system_tar := $(PRODUCT_OUT)/system.tar -INSTALLED_SYSTEMTARBALL_TARGET := $(system_tar).bz2 +INSTALLED_SYSTEMTARBALL_TARGET := $(system_tar).$(SYSTEM_TARBALL_FORMAT) $(INSTALLED_SYSTEMTARBALL_TARGET): PRIVATE_SYSTEM_TAR := $(system_tar) $(INSTALLED_SYSTEMTARBALL_TARGET): $(FS_GET_STATS) $(INTERNAL_SYSTEMIMAGE_FILES) $(build-systemtarball-target) diff --git a/tools/mktarball.sh b/tools/mktarball.sh index ea1a8ed..3e32006 100755 --- a/tools/mktarball.sh +++ b/tools/mktarball.sh @@ -39,7 +39,14 @@ for f in ${subdirs} ${files} ; do done if [ $? -eq 0 ] ; then - bzip2 -c ${target_tar} > ${target_tarball} + case "${target_tarball}" in + *.bz2 ) + bzip2 -c ${target_tar} > ${target_tarball} + ;; + *.gz ) + gzip -c ${target_tar} > ${target_tarball} + ;; + esac success=$? [ $success -eq 0 ] || rm -f ${target_tarball} rm -f ${target_tar} |