#!/usr/bin/env bash # shellcheck disable=SC1090 # shellcheck disable=SC1091 # shellcheck disable=SC2164 # # All of the following functions install things into the # CACHE_DIR, so they could be safely skipped in case of a # cache hit. Conversely, these should not attempt to export # environment variables (unless for self consumption), nor # modify other system parts (again, unless for self # consumption), as these will not be available in case of # cache hits. install_botan() { # botan local botan_build=${LOCAL_BUILDS}/botan local botan_v=${BOTAN_VERSION::1} if [[ ! -e "${BOTAN_INSTALL}/lib/libbotan-${botan_v}.so" ]] && \ [[ ! -e "${BOTAN_INSTALL}/lib/libbotan-${botan_v}.dylib" ]] && \ [[ ! -e "${BOTAN_INSTALL}/lib/libbotan-${botan_v}.a" ]]; then if [[ -d "${botan_build}" ]]; then rm -rf "${botan_build}" fi git clone --depth 1 --branch "${BOTAN_VERSION}" https://github.com/randombit/botan "${botan_build}" local osparam=() local cpuparam=() local run=run local osslparam=() local modules="" [[ "${botan_v}" == "2" ]] && osslparam+=("--without-openssl") && modules=$(&2 echo "\$GPG_VERSION is set to invalid value: ${GPG_VERSION}" exit 1 esac popd fi }