github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/contrib/cirrus/update_meta.sh (about)

     1  #!/bin/bash
     2  
     3  source $(dirname $0)/lib.sh
     4  
     5  # N/B: This script is expected to wrap $ENTRYPOINT when executing under the
     6  #      'meta' Cirrus task on the libpod repo.
     7  ENTRYPOINT=/usr/local/bin/entrypoint.sh
     8  
     9  req_env_var IMGNAMES BUILDID REPOREF GCPJSON GCPNAME GCPPROJECT CIRRUS_CI
    10  
    11  [[ -x "$ENTRYPOINT" ]] || \
    12      die 2 "Expecting to find an installed entrypoint script $ENTRYPOINT."
    13  
    14  # A better way of checking isn't compatible with old but functional images
    15  # in-use by other repos.
    16  grep -q 'compute images update' "$ENTRYPOINT" || \
    17      die 3 "Expecting to be running inside a specific imgts container image"
    18  
    19  canonicalize_image_names
    20  
    21  # Executing inside a container; proper hand-off for process control
    22  exec $ENTRYPOINT