#!/bin/bash ##===----------------------------------------------------------------------===## ## ## This source file is part of the SwiftCrypto open source project ## ## Copyright (c) 2021-2023 Apple Inc. and the SwiftCrypto project authors ## Licensed under Apache License v2.0 ## ## See LICENSE.txt for license information ## See CONTRIBUTORS.txt for the list of SwiftCrypto project authors ## ## SPDX-License-Identifier: Apache-2.0 ## ##===----------------------------------------------------------------------===## set -eu here=$(pwd) case "$(uname -s)" in Darwin) find=gfind # brew install findutils ;; *) # shellcheck disable=SC2209 find=find ;; esac function update_cmakelists_source() { src_root="$here/Sources/$1" src_exts=("*.c" "*.swift") num_exts=${#src_exts[@]} echo "Finding source files (" "${src_exts[@]}" ") under $src_root" # Build file extensions argument for `find` declare -a exts_arg exts_arg+=(-name "${src_exts[0]}") for (( i=1; i