github.com/cilium/cilium@v1.16.2/images/scripts/lint.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # Copyright Authors of Cilium
     4  # SPDX-License-Identifier: Apache-2.0
     5  
     6  set -o errexit
     7  set -o pipefail
     8  set -o nounset
     9  
    10  MAKER_IMAGE="${MAKER_IMAGE:-quay.io/cilium/image-maker:7de7f1c855ce063bdbe57fdfb28599a3ad5ec8f1@sha256:dde8500cbfbb6c41433d376fdfcb3831e2df9cec50cf4f49e8553dc6eba74e72}"
    11  
    12  root_dir="$(git rev-parse --show-toplevel)"
    13  
    14  if [ -z "${MAKER_CONTAINER+x}" ] ; then
    15     exec docker run --rm --volume "${root_dir}:/src" --workdir /src/images "${MAKER_IMAGE}" "/src/images/scripts/$(basename "${0}")"
    16  fi
    17  
    18  # shellcheck disable=SC2207
    19  scripts=($(find . -name '*.sh' -executable))
    20  
    21  for script in "${scripts[@]}" ; do
    22    shellcheck --external-source --source-path="$(dirname "${script}")" "${script}"
    23  done