Improvement: add xenial into make_repo.sh 15/16715/1
authorQiLiang <liangqi1@huawei.com>
Tue, 12 Jul 2016 11:03:14 +0000 (19:03 +0800)
committerQiLiang <liangqi1@huawei.com>
Tue, 12 Jul 2016 11:05:07 +0000 (19:05 +0800)
JIRA: COMPASS-431

Change-Id: I95d46d4a92923df4f00a0ca48d18ba2e2cd9ed55
Signed-off-by: QiLiang <liangqi1@huawei.com>
build/make_repo.sh

index d784a62..940b2ce 100755 (executable)
@@ -121,8 +121,14 @@ function make_repo()
         mkdir -p ${WORK_PATH}/work/tmp
         echo "${ansible_dir}"
         cp -rf ${ansible_dir}/roles/ ${WORK_PATH}/work/tmp/
-        if [[ -d ${ansible_dir}/openstack_${package_tag}/roles && "`ls ${ansible_dir}/openstack_${package_tag}`" != "" ]]; then
-            cp -rf ${ansible_dir}/openstack_${package_tag}/roles/* ${WORK_PATH}/work/tmp/roles/
+        if [[ ${os_ver} == xenial ]]; then
+            if [[ -d ${ansible_dir}/openstack_${package_tag}/roles && "`ls ${ansible_dir}/openstack_${package_tag}`" != "" ]]; then
+                cp -rf ${ansible_dir}/openstack_${package_tag}_${os_ver}/roles/* ${WORK_PATH}/work/tmp/roles/
+            fi
+        else
+            if [[ -d ${ansible_dir}/openstack_${package_tag}/roles && "`ls ${ansible_dir}/openstack_${package_tag}`" != "" ]]; then
+                cp -rf ${ansible_dir}/openstack_${package_tag}/roles/* ${WORK_PATH}/work/tmp/roles/
+            fi
         fi
         ansible_dir_tmp=${WORK_PATH}/work/tmp/
     fi