if [ -e "$imageout.raw" ]; then
mv "$imageout.raw" "/$TOPDIR/KIWI/$imageout$buildnum.raw"
echo "bzip2 raw file..."
- bzip2 "$imageout$buildnum.raw" && \
- echo 'Create sha256 file...' && \
+ bzip2 "$imageout$buildnum.raw"
+ echo "Create sha256 file..."
sha256sum "$imageout$buildnum.raw.bz2" > "$imageout$buildnum.raw.bz2.sha256"
fi
EOF
- chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
- rm -f $BUILD_ROOT/kiwi_post.sh
;;
vmx)
cat > $BUILD_ROOT/kiwi_post.sh << EOF
echo "Create sha256 file..."
sha256sum "$imageout$buildnum-vmx.tar.bz2" > "$imageout$buildnum-vmx.tar.bz2.sha256"
EOF
- chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
- rm -f $BUILD_ROOT/kiwi_post.sh
;;
xen)
cat > $BUILD_ROOT/kiwi_post.sh << EOF
cd $TOPDIR/KIWI
sha256sum "$imageout$buildnum-xen.tar.bz2" > "$imageout$buildnum-xen.tar.bz2.sha256"
EOF
- chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
- rm -f $BUILD_ROOT/kiwi_post.sh
;;
pxe)
cat > $BUILD_ROOT/kiwi_post.sh << EOF
cd $TOPDIR/KIWI
sha256sum "$imageout$buildnum-pxe.tar.bz2" > "$imageout$buildnum-pxe.tar.bz2.sha256"
EOF
- chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
- rm -f $BUILD_ROOT/kiwi_post.sh
;;
iso)
cat > $BUILD_ROOT/kiwi_post.sh << EOF
sha256sum "\$i" > "\$i.sha256"
done
EOF
- chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
- rm -f $BUILD_ROOT/kiwi_post.sh
;;
*)
cat > $BUILD_ROOT/kiwi_post.sh << EOF
cd /$TOPDIR/KIWI
sha256sum "$imageout$buildnum-$imgtype.tar.bz2" > "$imageout$buildnum-$imgtype.tar.bz2.sha256"
EOF
- chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
- rm -f $BUILD_ROOT/kiwi_post.sh
;;
esac
+ chroot $BUILD_ROOT su -c "sh -e -x /kiwi_post.sh" || cleanup_and_exit 1
+ rm -f $BUILD_ROOT/kiwi_post.sh
done
fi
}