dcapwell commented on code in PR #1757:
URL: https://github.com/apache/cassandra/pull/1757#discussion_r941339413


##########
bin/cassandra:
##########
@@ -132,21 +132,21 @@ find_library()
     pattern=$1
     path=$(echo ${2} | tr ":" " ")
 
-    find $path -regex "$pattern" -print 2>/dev/null | head -n 1
+    find $path -regex "$pattern" -print 2>/dev/null | sort -r | uniq | head -n 
1

Review Comment:
   “sort -u” makes things uniq, so don’t need that other pipe



##########
bin/cassandra:
##########
@@ -132,21 +132,21 @@ find_library()
     pattern=$1
     path=$(echo ${2} | tr ":" " ")
 
-    find $path -regex "$pattern" -print 2>/dev/null | head -n 1
+    find $path -regex "$pattern" -print 2>/dev/null | sort -r | uniq | head -n 
1
 }
 case "`uname -s`" in
     Linux)
         if [ -z $CASSANDRA_LIBJEMALLOC ] ; then
             which ldconfig > /dev/null 2>&1
-            if [ $? = 0 ] ; then
+            if [ ! -f /etc/lsb-release ] ; then

Review Comment:
   The above check makes sure the command exists, would keep it unless you 
found a bug. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to