Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring the option.Parse method #930

Merged
merged 4 commits into from
Feb 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix some issues with install.sh
  • Loading branch information
godruoyi committed Feb 13, 2023
commit e0d96b152df60381afebae8b93c94ceb27420d5b
15 changes: 11 additions & 4 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

RED='\033[0;31m'
NC='\033[0m'

# First - check OS.
OS="$(uname)"
Expand All @@ -11,7 +13,8 @@ if [[ "${OS}" == "Linux" ]]; then
elif [[ "${OS}" == "Darwin" ]];then
OS=darwin
else
abort "Unsupport OS - ${OS}"
echo -e "Error: ${RED}Unsupport OS - ${OS}${NC}"
exit
fi

# Second - check the CPU arch
Expand All @@ -21,10 +24,11 @@ if [[ $ARCH == x86_64 ]]; then
ARCH=amd64
elif [[ $ARCH == i686 || $ARCH == i386 ]]; then
ARCH=386
elif [[ $ARCH == aarch64* || $ARCH == armv8* ]]; then
elif [[ $ARCH == aarch64* || $ARCH == armv8* || $ARCH == arm64* ]]; then
ARCH=arm64
else
abort "Unsupport CPU - ${ARCH}"
echo -e "Error: ${RED}Unsupport CPU - ${ARCH}${NC}"
exit
fi

# Third - download the binaries
Expand All @@ -44,7 +48,8 @@ echo "Create the directory - \"${DIR}\" successfully."
echo "Downloading the release file - \"${ARTIFACT}\" ..."
curl -sL ${ARTIFACT_URL} -o ${DIR}/${ARTIFACT}
echo "Downloaded \"${ARTIFACT}\""
tar -zxf ${DIR}/${ARTIFACT} -C easegress
tar -zxf ${DIR}/${ARTIFACT} -C "${DIR}"
rm ${DIR}/${ARTIFACT}
echo "Extract the files successfully"

# Fourth - configure the easegress
Expand Down Expand Up @@ -82,3 +87,5 @@ if [[ "${OS}" == "linux" ]]; then
sleep 2
systemctl status easegress
fi

echo "Installed successfully"