|
|
fi | fi |
| |
# We only erase the old image when it is the exact same version as the | # We only erase the old image when it is the exact same version as the |
# current image. Different version old images are left behind. This is |
# current and new images. Different version old images are left behind. |
# consistent with how "make install" of the manual kernel build works. |
# This is consistent with how "make install" of the manual kernel build |
if [ "${currDestImage}.old" == "${prevDestImage}" ] |
# works. |
|
if [ "${currDestImage}" == "${fullDestName}" -a \ |
|
"${prevDestImage}" == "${currDestImage}.old" ] |
then | then |
# | # |
# Case for current / old of the same base version. |
# Case for new, currrent, and old of the same base version. |
# | # |
print_info 5 " Same base version. May have to delete old image to make room." | print_info 5 " Same base version. May have to delete old image to make room." |
if [ "${prevDestImageExists}" -eq '1' ] |
|
then |
|
print_info 5 " Deleting old identical version ${symlinkName}." |
|
rm -f "${BOOTDIR}/${prevDestImage}" |
|
fi |
|
| |
if [ "${currDestImageExists}" -eq '1' ] |
if [ "${currDestImageExists}" -eq '1' ] |
then | then |
|
if [ "${prevDestImageExists}" -eq '1' ] |
|
then |
|
print_info 5 " Deleting old identical version ${symlinkName}." |
|
rm -f "${BOOTDIR}/${prevDestImage}" |
|
fi |
print_info 5 " Moving ${BOOTDIR}/${currDestImage}" | print_info 5 " Moving ${BOOTDIR}/${currDestImage}" |
print_info 5 " to ${BOOTDIR}/${currDestImage}.old" | print_info 5 " to ${BOOTDIR}/${currDestImage}.old" |
mv "${BOOTDIR}/${currDestImage}" "${BOOTDIR}/${currDestImage}.old" || | mv "${BOOTDIR}/${currDestImage}" "${BOOTDIR}/${currDestImage}.old" || |
|
|
# | # |
# Case for current / old not of the same base version. | # Case for current / old not of the same base version. |
# | # |
print_info 5 " Different base version. Do not delete old iamges." |
print_info 5 " Different base version. Do not delete old images." |
if [ "${currDestImageExists}" -eq 1 ] | if [ "${currDestImageExists}" -eq 1 ] |
then | then |
prevDestImage="${currDestImage}" | prevDestImage="${currDestImage}" |
currDestImage="${fullDestName}" |
|
fi | fi |
|
currDestImage="${fullDestName}" |
fi | fi |
| |
print_info 5 " Copying ${symlinkName}: ${newSrceImage}" | print_info 5 " Copying ${symlinkName}: ${newSrceImage}" |