github.com/verrazzano/verrazzano@v1.7.1/tests/e2e/config/scripts/get_examples_image.sh (about)

     1  #!/bin/bash
     2  #
     3  # Copyright (c) 2022, 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  OAM_COMP_FILE=$1
     9  IMG_LIST_FILE=$2
    10  
    11  if [ -z "${OAM_COMP_FILE}" ] ; then
    12      echo "The script requires OAM component file defining the image(s) for the example"
    13      exit 1
    14  fi
    15  
    16  if [ -z "${IMG_LIST_FILE}" ] ; then
    17      echo "The script requires a file to append the example image(s)"
    18      exit 1
    19  fi
    20  
    21  cat ${OAM_COMP_FILE} | grep image: | grep example |\tr -s '[[:space:]]' '\n' |\sort |\uniq | grep verrazzano | grep / | cut -d/ -f2- | tr -d '"' >> ${IMG_LIST_FILE} || exit 1