Merge "multi VM: Multi VMs in serial or parallel"
[vswitchperf.git] / fuel-plugin-vsperf / pre_build_hook
1 #!/bin/bash
2
3 # Add here any the actions which are required before plugin build
4 # like packages building, packages downloading from mirrors and so on.
5 # The script should return 0 if there were no errors.
6 #!/bin/bash
7
8 set -eux
9
10 BUILD_FOR=${BUILD_FOR:-ubuntu}
11 DIR="$(dirname `readlink -f $0`)"
12
13 function build_pkg {
14   case $1 in
15     ubuntu)
16       cd ${DIR}/..
17       tar cfvz ${DIR}/repositories/ubuntu/vswitchperf.tgz . --exclude=vswitchperf.tgz
18       ;;
19     *) echo "Not supported system"; exit 1;;
20   esac
21 }
22
23 for system in $BUILD_FOR
24 do
25   build_pkg $system
26 done