2019-06-07 12:59:58 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
2019-07-09 16:45:28 -07:00
|
|
|
# Creates update_manifest_keypair.json based on the current platform and
|
|
|
|
# environment
|
2019-06-07 12:59:58 -07:00
|
|
|
#
|
|
|
|
set -e
|
|
|
|
|
|
|
|
OS=${1:-linux}
|
|
|
|
|
|
|
|
case "$OS" in
|
|
|
|
osx)
|
2022-01-03 12:13:21 -08:00
|
|
|
TARGET=$(uname -m)-apple-darwin
|
2019-06-07 12:59:58 -07:00
|
|
|
;;
|
|
|
|
linux)
|
|
|
|
TARGET=x86_64-unknown-linux-gnu
|
|
|
|
;;
|
|
|
|
windows)
|
|
|
|
TARGET=x86_64-pc-windows-msvc
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
TARGET=unknown-unknown-unknown
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR="SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_${TARGET//-/_}"
|
|
|
|
|
|
|
|
# shellcheck disable=2154 # is referenced but not assigned
|
|
|
|
if [[ -z ${!SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR} ]]; then
|
|
|
|
echo "$SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR not defined"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "${!SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR}" > update_manifest_keypair.json
|
|
|
|
ls -l update_manifest_keypair.json
|