diff --git a/scripts/image b/scripts/image index c7dead4335..c38e05c3cf 100755 --- a/scripts/image +++ b/scripts/image @@ -215,6 +215,8 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" # create release dir mkdir -p $RELEASE_DIR + # remove n previous created release image + rm -rf $TARGET_IMG/$IMAGE_NAME.img.gz if [ -n "$BOOTLOADER" ]; then BOOTLOADER_DIR=`find $PACKAGES -type d -name $BOOTLOADER 2>/dev/null` if [ -d "$BOOTLOADER_DIR"/files ]; then @@ -262,7 +264,6 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" # remove an previous created release tarball rm -rf $TARGET_IMG/$IMAGE_NAME.tar - rm -rf $TARGET_IMG/$IMAGE_NAME.img.gz # create release tarball tar cf $TARGET_IMG/$IMAGE_NAME.tar -C target $IMAGE_NAME