github.com/anjalikarhana/fabric@v2.1.1+incompatible/integration/externalbuilders/binary/bin/detect (about)

     1  #!/bin/bash
     2  
     3  # Copyright IBM Corp. All Rights Reserved.
     4  #
     5  # SPDX-License-Identifier: Apache-2.0
     6  
     7  set -euo pipefail
     8  
     9  if [ "$#" -ne 2 ]; then
    10      >&2 echo "Expected 2 directories got $#"
    11      exit 2
    12  fi
    13  
    14  # SRC="$1"
    15  META="$2"
    16  
    17  if [ "$(jq -r .type "$META/metadata.json")" == "binary" ]; then
    18      exit 0
    19  fi
    20  
    21  >&2 echo "binary is the only supported type"
    22  exit 1