janl commented on code in PR #4380:
URL: https://github.com/apache/couchdb/pull/4380#discussion_r1072364924


##########
configure:
##########
@@ -30,10 +30,15 @@ WITH_DOCS=1
 ERLANG_MD5="false"
 SKIP_DEPS=0
 
+run_erlang() {
+    erl -noshell -eval "$1" -eval "halt()."
+}
+
 COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)"
 SM_VSN=${SM_VSN:-"91"}
 ARCH="$(uname -m)"
-ERLANG_VER="$(erl -eval 'io:put_chars(erlang:system_info(otp_release)), 
halt().' -noshell)"
+ERLANG_VER="$(run_erlang 'io:put_chars(erlang:system_info(otp_release)).')"
+ERLANG_OS="$(run_erlang 'case os:type() of {OS, _} -> io:format("~s~n", [OS]) 
end.')"

Review Comment:
   shell scripts usually use `uname` for this type of stuff. Any particular 
reason why you chose this? — There is nothing wrong, just curious.



##########
configure:
##########
@@ -230,6 +235,26 @@ then
   exit 1
 fi
 
+if [ "${ERLANG_OS}" = "unix" ]
+then

Review Comment:
   small style nitpick, the rest of the file uses `if []; then`



-- 
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]

Reply via email to