Created
September 26, 2019 07:27
-
-
Save el-hoshino/068098956c85739dcdf4d4bee15cf30c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo " => Creating a temporary directory for codesigndoc ..." | |
temp_dir="$(mktemp -d -t codesigndocXXXXXX)" | |
codesigndoc_bin_path="${temp_dir}/codesigndoc" | |
version_to_use="2.3.1" | |
if [ "$1" != "" ] ; then | |
version_to_use="$1" | |
fi | |
if [ ! -z "${CODESIGNDOC_VERSION}" ] ; then | |
version_to_use="${CODESIGNDOC_VERSION}" | |
fi | |
echo " => Downloading version: ${version_to_use}" | |
scan_command_to_use="xcode" | |
codesigndoc_download_url="https://github.com/rozd/codesigndoc/releases/download/${version_to_use}/codesigndoc-Darwin-x86_64" | |
echo " => Downloading codesigndoc from (${codesigndoc_download_url}) to (${codesigndoc_bin_path}) ..." | |
curl -fL --progress-bar --output "${codesigndoc_bin_path}" "$codesigndoc_download_url" | |
echo " => Making it executable ..." | |
chmod +x "${codesigndoc_bin_path}" | |
echo " => codesigndoc version: $(${codesigndoc_bin_path} version)" | |
echo " => Running codesigndoc scan ..." | |
echo | |
${codesigndoc_bin_path} scan ${scan_command_to_use} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment