From 237a92210196a0583728573d4f53f87b7d16a482 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Tue, 27 Oct 2020 10:50:35 +0100 Subject: Fix English in comments; fix script synopsis text Change-Id: I6a67a8e675bdde8d9febc3edf8205c7516d979b8 Issue-ID: OOM-2612 Signed-off-by: Bartek Grzybowski --- build/create_repo.sh | 59 +++++++++++++++++++++---------------------- build/docker-entrypoint.sh | 63 ++++++++++++++++++++++------------------------ 2 files changed, 59 insertions(+), 63 deletions(-) (limited to 'build') diff --git a/build/create_repo.sh b/build/create_repo.sh index 9ca0b4ca..8fce53cc 100755 --- a/build/create_repo.sh +++ b/build/create_repo.sh @@ -1,45 +1,45 @@ #!/usr/bin/env bash -# Set type of distribution +# Set distribution type distro_type="$(cat /etc/*-release | grep -w "ID" | awk -F'=' '{ print $2 }' | tr -d '"')" -# Path to folder with cloned offline-installer build directory with docker_entrypoint script +# Path to cloned offline-installer build directory with docker_entrypoint script volume_offline_directory="$(readlink -f $(dirname ${0}))" -# Path for directory where repository will be created +# Destination path for created repository volume_repo_directory="$(pwd)" # Path inside container with cloned offline-installer build directory container_offline_volume="/mnt/offline/" -# Path inside container where will be created repository +# Target repository path inside container container_repo_volume="/mnt/repo/" -# Path inside container where will be stored additional packages lists +# Additional packages lists files path within container container_list_volume="/mnt/additional-lists/" -# Show help for using this script +# Show script usage help () { cat </resources/pkg/rhel/ RMP/DEB list is stored at: ./data_list/ EOF } -# Getting input parametters +# Getting input parameters POSITIONAL=() if [[ $# -eq 0 ]] ; then help # show help @@ -54,23 +54,23 @@ while [[ $# -gt 0 ]] do case "$1" in -h|--help) - # Help parametter + # Help parameter help # show help exit ;; -d|--directory) - # Directory parametter - # Sets path where will be created reposity + # Directory parameter + # Set target reposity path OFFLINE_REPO_DIR="$2" ;; -l|--list) - # List parametter - # Sets path where is stored onap_rpm.list or onap_deb.list file + # List parameter + # Set path containing onap_rpm.list or onap_deb.list file PCKG_LIST_DIR="$2" ;; -p|--packages-lists-path) - # Path parametter - # Sets path where is stored additional packages lists + # Path parameter + # Set path for additional packages lists ADD_LIST_DIR="$2" ;; -a|--additional-list) @@ -86,25 +86,22 @@ do shift;shift done -# Testing if directory parametter was used -# If not variable is sets to default value: -# /tmp/repo/resources/pkg/rpm -# or -# /tmp/repo/resources/pkg/deb +# Testing if directory parameter was used +# If not variable is set to /tmp/repo by default if test -z "$OFFLINE_REPO_DIR" then OFFLINE_REPO_DIR="/tmp/repo/" fi -# Testing if list parametter was used -# If not variable is sets to default value /tmp/offline/data-list +# Testing if list parameter was used +# If not variable is set to default value /tmp/offline/data-list if test -z "$PCKG_LIST_DIR" then PCKG_LIST_DIR="/tmp/offline/data_list/" fi -# Testing if additional packages list parametter was used -# If not variable is sets to default value /tmp/additional-lists +# Testing if additional packages list parameter was used +# If not variable is set to default value /tmp/additional-lists if test -z "$PCKG_LIST_DIR" then PCKG_LIST_DIR="/tmp/additional-lists/" @@ -141,7 +138,7 @@ case "$distro_type" in done; done - # Download all packages with dependecies from all additional packages lists via apt-get to repository folder + # Download all packages with dependencies from all additional packages lists via apt-get to repository folder if ! [ ${#ADDITIONAL_LISTS[@]} -eq 0 ]; then for list in ${ADDITIONAL_LISTS[@]} do @@ -179,7 +176,7 @@ case "$distro_type" in done fi - # In repository folder create repositor + # Create repository createrepo $OFFLINE_REPO_DIR ;; -- cgit 1.2.3-korg