Skip to content

Commit

Permalink
fix: fixes #442
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodney committed Sep 19, 2023
1 parent e934f69 commit d411f2f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions installer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@
ARCH=$(uname -m)
OS=$(echo $(uname) | tr '[:upper:]' '[:lower:]')

# Apple silicon machines expose ARCH as "arm64"
if [ "$OS" = "darwin" -a "$ARCH" = "arm64" ]; then
SUCCESSFUL=false

# Change "darwin" to "macos" to match up with release tarballs
if [ "$OS" = "darwin" ]; then
OS="macos"
ARCH="aarch64"
# Apple silicon machines expose ARCH as "arm64"
if [ "$ARCH" = "arm64" ]; then
ARCH="aarch64"
fi
fi

#change x86_64 to amd64
Expand Down Expand Up @@ -147,7 +152,7 @@
exit 4
fi
done

SUCCESSFUL=true
}

separate_output() {
Expand Down Expand Up @@ -213,7 +218,9 @@
}

cleanup() {
if [[ -d "${TMP_ROOT:-}" ]]; then
if [[ "$SUCCESSFUL" == "false" ]]; then
echo "Installation failed. Any downloaded files remain in ${TMP_ROOT} to aid troubleshooting."
elif [[ -d "${TMP_ROOT:-}" ]]; then
rm -rf "$TMP_ROOT"
fi
}
Expand Down

0 comments on commit d411f2f

Please # to comment.