spacewander commented on a change in pull request #5979:
URL: https://github.com/apache/apisix/pull/5979#discussion_r776942418



##########
File path: utils/install-dependencies.sh
##########
@@ -125,15 +125,34 @@ function install_luarocks() {
 # Entry
 function main() {
     OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]')
-    if [[ "${OS_NAME}" == "linux" ]]; then
-        multi_distro_installation
-        install_luarocks
-        install_etcd
-    elif [[ "${OS_NAME}" == "darwin" ]]; then
-        install_dependencies_on_mac_osx
-    else
-        echo "Non-surported distribution"
+    if [[ "$#" == 0 ]]; then
+        if [[ "${OS_NAME}" == "linux" ]]; then
+            multi_distro_installation
+            install_luarocks
+            install_etcd
+        elif [[ "${OS_NAME}" == "darwin" ]]; then
+            install_dependencies_on_mac_osx
+        else
+            echo "Non-surported distribution"
+        fi
+        return
     fi
+
+    case_opt=$1
+    case "${case_opt}" in
+        "install_etcd")
+            install_etcd
+        ;;
+        "install_luarocks")
+            install_luarocks
+        ;;
+        "multi_distro_installation")
+            multi_distro_installation
+        ;;
+        *)
+            echo "Unsupported method"

Review comment:
       Better to echo the unknown input




-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to