Merge pull request #44 from settlemint/main
feat: install the right op for arm on linux
This commit is contained in:
@@ -47,10 +47,19 @@ install_op_cli() {
|
|||||||
export OP_INSTALL_DIR
|
export OP_INSTALL_DIR
|
||||||
echo "::debug::OP_INSTALL_DIR: ${OP_INSTALL_DIR}"
|
echo "::debug::OP_INSTALL_DIR: ${OP_INSTALL_DIR}"
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
curl -sSfLo op.zip "https://cache.agilebits.com/dist/1P/op2/pkg/v2.10.0-beta.02/op_linux_amd64_v2.10.0-beta.02.zip"
|
ARCHITECTURE=""
|
||||||
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
ARCHITECTURE="amd64"
|
||||||
|
elif [[ "$(uname -m)" == "aarch64" ]]; then
|
||||||
|
ARCHITECTURE="arm64"
|
||||||
|
else
|
||||||
|
echo "Unsupported architecture"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
curl -sSfLo op.zip "https://cache.agilebits.com/dist/1P/op2/pkg/v2.18.0/op_linux_${ARCHITECTURE}_v2.18.0.zip"
|
||||||
unzip -od "$OP_INSTALL_DIR" op.zip && rm op.zip
|
unzip -od "$OP_INSTALL_DIR" op.zip && rm op.zip
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
curl -sSfLo op.pkg "https://cache.agilebits.com/dist/1P/op2/pkg/v2.10.0-beta.02/op_apple_universal_v2.10.0-beta.02.pkg"
|
curl -sSfLo op.pkg "https://cache.agilebits.com/dist/1P/op2/pkg/v2.18.0/op_apple_universal_v2.18.0.pkg"
|
||||||
pkgutil --expand op.pkg temp-pkg
|
pkgutil --expand op.pkg temp-pkg
|
||||||
tar -xvf temp-pkg/op.pkg/Payload -C "$OP_INSTALL_DIR"
|
tar -xvf temp-pkg/op.pkg/Payload -C "$OP_INSTALL_DIR"
|
||||||
rm -rf temp-pkg && rm op.pkg
|
rm -rf temp-pkg && rm op.pkg
|
||||||
|
|||||||
Reference in New Issue
Block a user