"Fossies" - the Fresh Open Source Software Archive

Member "cli-1.1280.1/cliv2/scripts/issigned_darwin.sh" (20 Feb 2024, 324 Bytes) of package /linux/misc/snyk-cli-1.1280.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env bash
    2 set -uo pipefail
    3 
    4 LOG_PREFIX="--- $(basename "$0"):"
    5 
    6 if [[ "$OSTYPE" != *"darwin"* ]]; then
    7   echo "$LOG_PREFIX ERROR! This script needs to be run on macOS!"
    8   exit 1
    9 fi
   10 
   11 if ! codesign --verify --deep --strict "$1"; then
   12   echo "$LOG_PREFIX NOT signed!"
   13   exit 1
   14 else
   15   echo "$LOG_PREFIX is signed!"
   16 fi