summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2016-07-28 18:04:29 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-07-28 18:04:29 +0000
commit49966bab17f2e39d798b1a177896aa5dc9a5a458 (patch)
tree186c9e59701aac131f0cd54998530cf1628d19ef
parenteada591154c47bfe5ba73342368a05b7f94ff0a8 (diff)
parent32f61d3438afd9eb684befea38a6d73d3c89ea37 (diff)
downloaddevice_common-49966bab17f2e39d798b1a177896aa5dc9a5a458.tar.gz
device_common-49966bab17f2e39d798b1a177896aa5dc9a5a458.tar.bz2
device_common-49966bab17f2e39d798b1a177896aa5dc9a5a458.zip
Consistently use SHA256 for filenames (previously, MD5 and SHA1 were used). am: 72a67b76c6 am: 4b636830cd am: 074067b725 am: d34002fb87 am: ffe6f59740
am: 32f61d3438 Change-Id: I35f8e017662d408f20f8f8a9139970109a2300a1
-rw-r--r--generate-factory-images-common.sh2
-rwxr-xr-xgenerate-packages.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/generate-factory-images-common.sh b/generate-factory-images-common.sh
index 63ab260..b8d6707 100644
--- a/generate-factory-images-common.sh
+++ b/generate-factory-images-common.sh
@@ -294,7 +294,7 @@ chmod a+x tmp/$PRODUCT-$VERSION/flash-base.sh
# Create the distributable package
(cd tmp ; tar zcvf ../$PRODUCT-$VERSION-factory.tgz $PRODUCT-$VERSION)
-mv $PRODUCT-$VERSION-factory.tgz $PRODUCT-$VERSION-factory-$(sha1sum < $PRODUCT-$VERSION-factory.tgz | cut -b -8).tgz
+mv $PRODUCT-$VERSION-factory.tgz $PRODUCT-$VERSION-factory-$(sha256sum < $PRODUCT-$VERSION-factory.tgz | cut -b -8).tgz
# Clean up
rm -rf tmp
diff --git a/generate-packages.sh b/generate-packages.sh
index 6179866..6bb503f 100755
--- a/generate-packages.sh
+++ b/generate-packages.sh
@@ -141,7 +141,7 @@ do
cat PART3 >> tmp/$SCRIPT || echo \ \ \ \ Error generating script
(cd tmp ; tar zc --owner=root --group=root vendor/ >> $SCRIPT || echo \ \ \ \ Error generating embedded tgz)
chmod a+x tmp/$SCRIPT || echo \ \ \ \ Error generating script
- ARCHIVE=$COMPANY-$DEVICE-$BUILD-$(md5sum < tmp/$SCRIPT | cut -b -8 | tr -d \\n).tgz
+ ARCHIVE=$COMPANY-$DEVICE-$BUILD-$(sha256sum < tmp/$SCRIPT | cut -b -8 | tr -d \\n).tgz
rm -f $ARCHIVE
echo \ \ Generating final archive
(cd tmp ; tar --owner=root --group=root -z -c -f ../$ARCHIVE $SCRIPT || echo \ \ \ \ Error archiving script)