forked from openkylin/platform_build
Merge "Create systemtarball either with bz2 or gz"
This commit is contained in:
commit
f5f11eb01c
|
@ -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)
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue