6ed2e1b1cd
The pngcrush tool does not add any noticeable value any more, such that it justifies the extra build time: 240MB vs 238MB. The build.prop changes are now no ops, since the key for ro.kernel.android.checkjni no longer exists. Changing the ro.build.type from eng to user is also a no op, since CM is now userdebug. Deleting bins is also unncessary now. Stripping modules is also unnecessary now. (plenty of space) At this point, I think we can just symlink $OUTFILE to $OTAPACKAGE, and not even bother with a copy. Change-Id: I431ac6425dedb6cd02eb2d31fc9ff82b49df9f50
53 lines
1.1 KiB
Bash
Executable File
53 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Squish a CM otapackage for distribution
|
|
# cyanogen
|
|
#
|
|
|
|
. $ANDROID_BUILD_TOP/vendor/cm/tools/functions
|
|
|
|
OUT_TARGET_HOST=`uname -a | grep Darwin`
|
|
if [ -z "$OUT_TARGET_HOST" ]
|
|
then
|
|
OUT_TARGET_HOST=linux-x86
|
|
MD5=md5sum
|
|
XARGS="xargs --max-args=1 --max-procs `grep 'processor' /proc/cpuinfo|wc -l`"
|
|
SED=sed
|
|
else
|
|
OUT_TARGET_HOST=darwin-x86
|
|
MD5=md5
|
|
XARGS="xargs -n 1 -P `sysctl hw.ncpu | awk '{print $2}'`"
|
|
SED=gsed
|
|
fi
|
|
|
|
if [ -z "$OUT" -o ! -d "$OUT" ]; then
|
|
echo -e $CL_RED"ERROR: $0 only works with a full build environment. $OUT should exist."$CL_RST
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f "$OTAPACKAGE" ]; then
|
|
echo -e $CL_RED"$OTAPACKAGE doesn't exist!"$CL_RST;
|
|
exit 1
|
|
fi
|
|
|
|
# Determine what to name the new package
|
|
MODVERSION=`sed -n -e'/ro\.cm\.version/s/^.*=//p' $OUT/system/build.prop`
|
|
echo -e $CL_CYN"MODVERSION: $MODVERSION"$CL_RST
|
|
OUTFILE=$OUT/cm-$MODVERSION.zip
|
|
|
|
cp $OTAPACKAGE $OUTFILE.tmp
|
|
mv $OUTFILE.tmp $OUTFILE
|
|
|
|
# Create a md5 checksum image of the repacked package
|
|
(
|
|
img=`basename $OUTFILE`
|
|
cd `dirname $OUTFILE`
|
|
$MD5 $img >$img.md5sum
|
|
echo
|
|
echo -e $CL_GRN"Package complete: $OUTFILE"$CL_RST
|
|
cat $img.md5sum
|
|
echo
|
|
)
|
|
|
|
exit 0
|