github.com/verrazzano/verrazzano@v1.7.1/tools/scripts/generate_catalog.sh (about) 1 #!/usr/bin/env bash 2 # 3 # Copyright (c) 2023, Oracle and/or its affiliates. 4 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 # 6 7 SCRIPT_DIR=$(cd $(dirname "$0"); pwd -P) 8 9 if [ ! -f "$1" ]; then 10 echo "You must specify the catalog file as input" 11 exit 1 12 fi 13 CATALOG_FILE=$1 14 15 if [ -z "$2" ]; then 16 echo "You must specify the Version" 17 exit 1 18 fi 19 VERRAZZANO_VERSION=$2 20 21 GENERATED_CATALOG_FILE=$3 22 if [ -z "${GENERATED_CATALOG_FILE}" ]; then 23 echo "You must specify the catalog filename as output" 24 exit 1 25 fi 26 27 cp ${CATALOG_FILE} ${GENERATED_CATALOG_FILE} 28 29 # Update the catalog file with the Verrazzano version 30 regex=".*:.*" 31 sed -i"" -e "s|VERRAZZANO_VERSION|${VERRAZZANO_VERSION}|g" ${GENERATED_CATALOG_FILE}