diff options
author | shravani <shravani.p@tcs.com> | 2016-12-20 15:09:34 +0530 |
---|---|---|
committer | Shravani Paladugula <shravani.p@tcs.com> | 2017-02-09 04:34:34 +0000 |
commit | 843dfef73c86a8ad71afe36e2db9e711dddc199a (patch) | |
tree | 52c15baf57c751cf91bf35b3dbc027adacfa7a1d /ci/build_interface.sh | |
parent | 881aa3fcf152088440444d6f4296eaac3783801c (diff) |
Combine the common code for kernel building on deb/rpm
This patch removes the duplication of code in rpm/debian build
scripts.
Change-Id: I88edc93df488bd01a43cd98e4f69f35e09f8f61c
Signed-off-by: Shravani <shravani.p@tcs.com>
Diffstat (limited to 'ci/build_interface.sh')
-rwxr-xr-x | ci/build_interface.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ci/build_interface.sh b/ci/build_interface.sh new file mode 100755 index 000000000..6f5fadc28 --- /dev/null +++ b/ci/build_interface.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +type=$1 + +tmp_build_dir=/root/kvmfornfv +build_dir=/opt/kvmfornfv +tmp_output_dir=$tmp_build_dir/build_output +output_dir=$build_dir/build_output +cp -r $build_dir $tmp_build_dir + +# Build qemu rpm packages +cd $tmp_build_dir/qemu +make clean +./configure + +cd $tmp_build_dir +#Build qemu package +./ci/qemu_build.sh build_output $type +# Build kernel packages +./ci/kernel_build.sh build_output $type + +if [ $type == "centos" ];then + # Move Kernel and Qemu Rpm builds from tmp_output_dir to output_dir + mv $tmp_output_dir/qemu-* $output_dir + mv $tmp_output_dir/kernel-* $output_dir +elif [ $type == "ubuntu" ];then + # Move Kernel and Qemu Debian builds from tmp_output_dir to output_dir + mv $tmp_output_dir/qemu-* $output_dir + mv $tmp_output_dir/linux-* $output_dir +fi |