diff options
Diffstat (limited to 'fuel-plugin/pre_build_hook')
-rw-r--r-- | fuel-plugin/pre_build_hook | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fuel-plugin/pre_build_hook b/fuel-plugin/pre_build_hook new file mode 100644 index 000000000..9b3b93116 --- /dev/null +++ b/fuel-plugin/pre_build_hook @@ -0,0 +1,23 @@ +#!/bin/bash + +set -eux + +BUILD_FOR=${BUILD_FOR:-ubuntu} +DIR="$(dirname `readlink -f $0`)" + +function build_pkg { + case $1 in + ubuntu) + sudo docker build -t kvm . + container_id=`sudo docker run -d kvm` + sudo docker cp $container_id:/linux-headers-4.1.10-rt10nfv_1.0.OPNFV_amd64.deb ${DIR}/repositories/ubuntu/ + sudo docker cp $container_id:/linux-image-4.1.10-rt10nfv_1.0.OPNFV_amd64.deb ${DIR}/repositories/ubuntu/ + ;; + *) echo "Not supported system"; exit 1;; + esac +} + +for system in $BUILD_FOR +do + build_pkg $system +done |