zaunist commented on a change in pull request #5209:
URL: https://github.com/apache/apisix/pull/5209#discussion_r726874508
##########
File path: utils/install-dependencies.sh
##########
@@ -104,24 +102,25 @@ function multi_distro_installation() {
# Install etcd
function install_etcd() {
- wget
https://github.com/etcd-io/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-amd64.tar.gz
- tar -xvf etcd-v3.4.13-linux-amd64.tar.gz && \
- cd etcd-v3.4.13-linux-amd64 && \
+ ETCD_VERSION='3.4.13'
+ wget
https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
+ tar -xvf etcd-v${ETCD_VERSION}-linux-amd64.tar.gz && \
+ cd etcd-v${ETCD_VERSION}-linux-amd64 && \
sudo cp -a etcd etcdctl /usr/bin/
nohup etcd &
}
# Entry
-function main() {
- a=`uname -s`
- if [[ ${a} == "Linux" ]]; then
+function main() {
+ OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]')
+ if [[ ${OS_NAME} == "linux" ]]; then
multi_distro_installation
install_etcd
- elif [[ ${a} == "Darwin" ]]; then
+ elif [[ ${OS_NAME} == "darwin" ]]; then
install_dependencies_on_mac_osx
else
echo "Non-surported distribution"
fi
}
-main
+main
Review comment:
👌🏻
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]