X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=build%2Fcreate_repo.sh;h=f2bde32d7c69a7620fd14b838fbdd63dc3c5163b;hb=2a0d4e7736c4a9951670680fe4d83bfda0beda2e;hp=b6db6ad2800cdb00a9bc0600b8ba35de8d64bd04;hpb=8fdbfe78282009cef8357ff31c2e5ad39ef0b059;p=oom%2Foffline-installer.git diff --git a/build/create_repo.sh b/build/create_repo.sh index b6db6ad2..f2bde32d 100755 --- a/build/create_repo.sh +++ b/build/create_repo.sh @@ -1,34 +1,79 @@ #!/usr/bin/env bash -container_name="centos_repo" -# Path to folder with cloned offline-installer build directory with docker_entrypoint script +# Set distribution type +distro_type="$(cat /etc/*-release | grep -w "ID" | awk -F'=' '{ print $2 }' | tr -d '"')" + +# 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/" -# Docker image name and version -docker_image="centos:centos7.6.1810" -# Expected directory for RPM packages -expected_dir="resources/pkg/rhel" +# Additional packages lists files path within container +container_list_volume="/mnt/additional-lists/" + +# Use cache by default +drop_cache=false + +# Show script usage help () { - echo "Script for run docker container with RPM repository" - echo "usage: create_repo.sh [-d|--destination-repository output directory] [-c|--cloned-directory input directory]" - echo "-h --help: Show this help" - echo "-d --destination-repository: set path where will be stored RPM packages. Default value is current directory" - echo "-c --cloned-directory: set path where is stored this script and docker-entrypoint script (offline-installer/build directory). Fill it just when you want to use different script/datalists" - echo "If build folder from offline repository is not specified will be used default path of current folder." +cat <