Skip to content

Commit

Permalink
- export raw files of kiwi vmx builds as last resort, but rename them…
Browse files Browse the repository at this point in the history
… to avoid clashes with other kiwi builds
  • Loading branch information
adrianschroeter committed Oct 23, 2013
1 parent 0f638cb commit 8d3d436
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions build_kiwi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,23 @@ for i in "$imageout.vmx" "$imageout.vmdk" "$imageout-disk*.vmdk"; do
test -e \$i && VMXFILES="\$VMXFILES \$i"
done
# take raw files as fallback
# do not do that, it may overwrite files when multiple -vmx flavors are configured
#if [ -z "\$VMXFILES" ]; then
# test -e "$imageout.raw" && VMXFILES="$imageout.raw"
#fi
if [ -n "\$VMXFILES" ]; then
tar cvjfS "/$TOPDIR/KIWI/$imageout$buildnum-vmx.tar.bz2" \$VMXFILES
SHAFILES="\$SHAFILES $imageout$buildnum-vmx.tar.bz2"
elif [ -e "$imageout.raw" ]; then
compress_tool="bzip2"
compress_suffix="bz2"
if [ -x /usr/bin/xz ]; then
# take xz to get support for sparse files
compress_tool="xz -2"
compress_suffix="xz"
fi
mv "$imageout.raw" "/$TOPDIR/KIWI/$imageout$buildnum-vmx.raw"
pushd /$TOPDIR/KIWI
echo "\$compress_tool raw file..."
\$compress_tool "$imageout$buildnum-vmx.raw"
SHAFILES="\$SHAFILES $imageout$buildnum-vmx.raw.\$compress_suffix"
popd
fi
if [ -e "$imageout.xenconfig" ]; then
tar cvjfS "/$TOPDIR/KIWI/$imageout$buildnum-vmx.tar.bz2" $imageout.xenconfig $imageout.raw initrd-*
Expand Down

0 comments on commit 8d3d436

Please sign in to comment.