Skip to content

Commit

Permalink
uncomment install script
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Oct 24, 2023
1 parent 60d9919 commit 2f7eb4d
Showing 1 changed file with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
#!/bin/bash
alias constellation="./constellation"
#if ! command -v constellation &> /dev/null
#then
# OS=$(uname -s)
# ARCH=$(uname -m)
if ! command -v constellation &> /dev/null
then
OS=$(uname -s)
ARCH=$(uname -m)

# URL=""
URL=""

# if [[ "$OS" = "Darwin" ]]; then
# if [[ "$ARCH" = "arm64" ]]; then
# URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-darwin-arm64"
# elif [[ "$ARCH" = "x86_64" ]]; then
# URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-darwin-amd64"
# fi
# elif [[ "$OS" = "Linux" ]]; then
# if [[ "$ARCH" = "x86_64" ]]; then
# URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-amd64"
# elif [[ "$ARCH" = "arm64" ]]; then
# URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-arm64"
# fi
# fi
if [[ "$OS" = "Darwin" ]]; then
if [[ "$ARCH" = "arm64" ]]; then
URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-darwin-arm64"
elif [[ "$ARCH" = "x86_64" ]]; then
URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-darwin-amd64"
fi
elif [[ "$OS" = "Linux" ]]; then
if [[ "$ARCH" = "x86_64" ]]; then
URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-amd64"
elif [[ "$ARCH" = "arm64" ]]; then
URL="https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-arm64"
fi
fi

# if [ -z "$URL" ]; then
# echo "Unsupported OS or architecture"
# exit 1
# else
# curl -o constellation -LO $URL
# sudo install constellation /usr/local/bin/constellation
# fi
#fi
if [ -z "$URL" ]; then
echo "Unsupported OS or architecture"
exit 1
else
curl -o constellation -LO $URL
sudo install constellation /usr/local/bin/constellation
fi
fi

0 comments on commit 2f7eb4d

Please sign in to comment.