aboutsummaryrefslogtreecommitdiffstats
path: root/repo/make_repo.sh
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2016-11-24 08:47:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-24 08:47:48 +0000
commit36f5cffcf373a8a12677c8e406cd11c8d9ffe2bb (patch)
treea20455421b7bdf19890032ce4da74ceee3a46762 /repo/make_repo.sh
parent2446530c3230221d76877851012eb39e2a7c0360 (diff)
parent35086233fdfb4163c589fc258229a931bb02df1a (diff)
Merge "Create make_repo directory and optimize the current repo making related script"
Diffstat (limited to 'repo/make_repo.sh')
-rwxr-xr-xrepo/make_repo.sh109
1 files changed, 109 insertions, 0 deletions
diff --git a/repo/make_repo.sh b/repo/make_repo.sh
new file mode 100755
index 00000000..b857a9fa
--- /dev/null
+++ b/repo/make_repo.sh
@@ -0,0 +1,109 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+#set -ex
+
+REPO_PATH=$(cd "$(dirname "$0")"; pwd)
+COMPASS_PATH=$(cd "$(dirname "$0")"/..; pwd)
+
+#source $REPO_PATH/repo.conf
+source $REPO_PATH/repo_func.sh
+
+function param_process()
+{
+ if [ ! -z "$1" ]; then
+ case $1 in
+ openstack)
+ export MAKE_OPENSTACK="true"
+ ;;
+ pip)
+ export MAKE_PIP="true"
+ ;;
+ feature)
+ export MAKE_FEATURE="true"
+ ;;
+ jumphost)
+ export MAKE_JH="true"
+ ;;
+ compass)
+ export MAKE_COMPASS="true"
+ ;;
+ all)
+ export MAKE_ALL="true"
+ ;;
+ help)
+ usage
+ exit
+ ;;
+ *)
+ echo "'$1' is not a valid parameter."
+ usage
+ exit
+ ;;
+ esac
+
+ else
+ echo "Please add a valid parameter!"
+ usage
+ exit
+ fi
+}
+
+function usage()
+{
+ echo 'Usage: ./repo/make_repo.sh [option]'
+ echo 'All the valid options are:
+ openstack Make OpenStack PPA.
+ pip Make pip package.
+ feature Make feature project package, such as SDN, Moon, KVM, etc.
+ jumphost Make jumphost preparasion package.
+ compass Make compass VM package.
+ all Make all packages.
+ help Show usage.'
+}
+
+function main()
+{
+ process_env
+
+ if [[ $MAKE_OPENSTACK == "true" ]]; then
+ make_osppa
+ fi
+
+ if [[ $MAKE_PIP == "true" ]]; then
+# make_repo --package-tag pip
+ make_pip_repo
+ fi
+
+ if [[ $MAKE_FEATURE == "true" ]]; then
+# make_repo --package-tag feature
+ make_feature_repo
+ fi
+
+ if [[ $MAKE_JH == "true" ]]; then
+ make_jhenv_repo
+ fi
+
+ if [[ $MAKE_COMPASS == "true" ]]; then
+ make_compass_repo
+ fi
+
+ if [[ $MAKE_ALL == "true" ]]; then
+ make_osppa
+ make_pip_repo
+ make_feature_repo
+ make_jhenv_repo
+ make_compass_repo
+ fi
+
+}
+
+param_process "$@"
+
+main