mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 01:48:42 +09:00
Fix double compression whe finishing the OS image
Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I9e81262917eccd1b796f84e8f327579afe7b7197
This commit is contained in:
16
functions
16
functions
@@ -342,17 +342,15 @@ do_finalize_image() {
|
||||
if [ -f ${disk} ]; then
|
||||
echo "I: finalizing OS image - '${osimage}'"
|
||||
mv -f ${disk} ${osimage} || panic "failed to target image file"
|
||||
if [ "x${COMPRESS}" = "xtrue" ]; then
|
||||
echo "I: compressing OS image to ${osimage}"
|
||||
xz ${osimage} || panic "failed to create compressed image file"
|
||||
osimage=${osimage}.xz
|
||||
fi
|
||||
md5sum ${osimage} > ${osimage}.md5sum
|
||||
if [ "x${COMPRESS}" = "xtrue" ]; then
|
||||
echo "I: compressing OS image - '${osimage}'"
|
||||
rm -f ${osimage}.xz
|
||||
xz --verbose ${osimage} || panic "failed to create compressed image file"
|
||||
md5sum ${osimage}.xz > ${osimage}.xz.md5sum
|
||||
fi
|
||||
|
||||
xz ${osimage}
|
||||
md5sum ${osimage}.xz > ${osimage}.xz.md5sum
|
||||
|
||||
sed -i -r "s/ .*\/(.+)/ \1/g" ${osimage}.md5sum ${osimage}.xz.md5sum
|
||||
sed -i -r "s/ .*\/(.+)/ \1/g" ${osimage}*.md5sum
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user