Merge "Remove an excess cp of disk images."
This commit is contained in:
commit
bfba0ccd03
@ -187,5 +187,7 @@ unmount_image
|
||||
if [ "$IS_RAMDISK" == "0" ]; then
|
||||
compress_and_save_image $IMAGE_NAME.$IMAGE_TYPE
|
||||
else
|
||||
remove_image
|
||||
# This is a ramdisk build, we have already extracted the kernel and ramdisk
|
||||
# by this point.
|
||||
rm $TMP_IMAGE_PATH
|
||||
fi
|
||||
|
@ -40,6 +40,14 @@ function mk_build_dir () {
|
||||
export TMP_HOOKS_PATH=$TMP_BUILD_DIR/hooks
|
||||
}
|
||||
|
||||
function finish_image () {
|
||||
mv $TMP_IMAGE_PATH $1
|
||||
cleanup_dirs
|
||||
# All done!
|
||||
trap EXIT
|
||||
echo "Image file $1 created..."
|
||||
}
|
||||
|
||||
function save_image () {
|
||||
# TODO: this really should rename the old file
|
||||
if [ -f $1 ] ; then
|
||||
|
@ -106,13 +106,7 @@ function compress_and_save_image () {
|
||||
rm $TMP_IMAGE_PATH
|
||||
|
||||
TMP_IMAGE_PATH=$1-new
|
||||
save_image $1
|
||||
remove_image
|
||||
}
|
||||
|
||||
function remove_image () {
|
||||
echo "Removing $TMP_IMAGE_PATH"
|
||||
rm $TMP_IMAGE_PATH
|
||||
finish_image $1
|
||||
}
|
||||
|
||||
function do_extra_package_install () {
|
||||
|
Loading…
Reference in New Issue
Block a user