summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild/creating_data/docker-images-collector.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/build/creating_data/docker-images-collector.sh b/build/creating_data/docker-images-collector.sh
index e13b9150..7e468c44 100755
--- a/build/creating_data/docker-images-collector.sh
+++ b/build/creating_data/docker-images-collector.sh
@@ -30,9 +30,9 @@ usage () {
echo " "
echo " This script is preparing docker images list based on kubernetes project"
echo " Usage:"
- echo " ./$(basename $0) <project version> <path to project> [<output list file>]"
+ echo " ./$(basename $0) <path to project> [<output list file>]"
echo " "
- echo " Example: ./$(basename $0) onap_3.0.2 /root/oom/kubernetes/onap"
+ echo " Example: ./$(basename $0) /root/oom/kubernetes/onap"
echo " "
echo " Dependencies: helm, python-yaml, make"
echo " "
@@ -61,20 +61,22 @@ create_list() {
}
# Configuration
-TAG="${1}"
-PROJECT_DIR="${2}"
-LIST="${3}"
+if [ "${1}" == "-h" ] || [ "${1}" == "--help" ] || [ $# -lt 1 ]; then
+ usage
+fi
+
+PROJECT_DIR="${1}"
+LIST="${2}"
LISTS_DIR="$(readlink -f $(dirname ${0}))/../data_lists"
HELM_REPO="local http://127.0.0.1:8879"
+PROJECT="$(basename ${1})"
-if [ "${1}" == "-h" ] || [ "${1}" == "--help" ] || [ $# -lt 2 ]; then
- usage
-elif [ ! -f "${PROJECT_DIR}/../Makefile" ]; then
+if [ ! -f "${PROJECT_DIR}/../Makefile" ]; then
echo "Wrong path to project directory entered"
exit 1
elif [ -z "${LIST}" ]; then
mkdir -p ${LISTS_DIR}
- LIST="${LISTS_DIR}/${TAG}-docker_images.list"
+ LIST="${LISTS_DIR}/${PROJECT}_docker_images.list"
fi
if [ -e "${LIST}" ]; then
@@ -82,8 +84,6 @@ if [ -e "${LIST}" ]; then
MSG="$(realpath ${LIST}) already existed\nCreated backup $(realpath ${LIST}).bk\n"
fi
-PROJECT="$(basename ${2})"
-
# Setup helm
if pgrep -x "helm" > /dev/null; then
echo "helm is already running"