Packaging update to support building ODL distributions.
[integration/packaging.git] / packaging / rpm / run.dist.sh
1 #!/bin/bash
2
3 function usage {
4     echo "Please select one of the 3 supported Virtualization technology : \"$0 -virt [ovsdb | opendove | vtn]\""
5     exit 1
6 }
7
8 virtIndex=0
9 while true ; do
10     (( i += 1 ))
11     case "${@:$i:1}" in
12         -virt) virtIndex=$i ;;
13         "") break ;;
14     esac
15 done
16
17 # Virtualization edition select
18 if [ ${virtIndex} -eq 0 ]; then
19     usage
20 fi
21
22 virt=${@:$virtIndex+1:1}
23 if [ "${virt}" == "" ]; then
24     usage
25 else
26     if [ "${virt}" == "ovsdb" ]; then
27         ODL_VIRT_FILTER="opendove|vtn"
28     elif [ "${virt}" == "opendove" ]; then
29         ODL_VIRT_FILTER="ovsdb|vtn"
30     elif [ "${virt}" == "vtn" ]; then
31         ODL_VIRT_FILTER="affinity|opendove|ovsdb|controller.(arphandler|samples)"
32     else
33         usage
34     fi
35 fi
36
37 /usr/share/opendaylight-controller/run.sh -Dfelix.fileinstall.filter="^(?!org.opendaylight.(${ODL_VIRT_FILTER})).*" "${@:1:$virtIndex-1}" "${@:virtIndex+2}"