szetszwo commented on code in PR #711:
URL: https://github.com/apache/ratis/pull/711#discussion_r944235614


##########
ratis-shell/src/main/libexec/ratis-shell-config.sh:
##########
@@ -58,6 +59,16 @@ if [[ ${JAVA_MAJORMINOR} != 001008 && ${JAVA_MAJOR} != 011 
]]; then
   exit 1
 fi
 
+local RATIS_SHELL_CLASSPATH
+
+while read -d '' -r jarfile ; do
+    if [[ "$RATIS_SHELL_CLASSPATH" == "" ]]; then
+        RATIS_SHELL_CLASSPATH="$jarfile";
+    else
+        RATIS_SHELL_CLASSPATH="$RATIS_SHELL_CLASSPATH":"$jarfile"
+    fi
+done < <(find "$RATIS_SHELL_LIB_DIR" ! -type d -name '*.jar' -print0 | sort -z)

Review Comment:
   @leo65535 , bash worked file.  Thanks!
   
   It seems that tar somehow have not preserved the permissions
   ```shell
   $tar tvzf ratis-assembly/target/apache-ratis-3.0.0-SNAPSHOT-bin.tar.gz
   ...
   -rw-r--r--  0 root   root     2152 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/bin/ratis
   -rw-r--r--  0 root   root     1580 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/conf/log4j.properties
   -rw-r--r--  0 root   root     7118 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/examples/README.md
   -rw-r--r--  0 root   root     1138 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/examples/bin/client.sh
   -rw-r--r--  0 root   root     1859 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/examples/bin/common.sh
   -rw-r--r--  0 root   root      921 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/examples/bin/server.sh
   -rw-r--r--  0 root   root     1598 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/examples/bin/start-all.sh
   -rw-r--r--  0 root   root      922 Jan 22  2020 
apache-ratis-3.0.0-SNAPSHOT-bin/examples/bin/stop-all.sh
   ...
   ```
   The permissions are correct in ratis-assembly/target dir
   ```shell
   $ls -l 
ratis-assembly/target/apache-ratis-3.0.0-SNAPSHOT-bin/apache-ratis-3.0.0-SNAPSHOT-bin/bin/
   total 8
   -rwxr-xr-x  1 szetszwo  staff  2152 Jan 22  2020 ratis
   $ls -l 
ratis-assembly/target/apache-ratis-3.0.0-SNAPSHOT-bin/apache-ratis-3.0.0-SNAPSHOT-bin/examples/bin/
   total 40
   -rwxr-xr-x  1 szetszwo  staff  1138 Jan 22  2020 client.sh
   -rwxr-xr-x  1 szetszwo  staff  1859 Jan 22  2020 common.sh
   -rwxr-xr-x  1 szetszwo  staff   921 Jan 22  2020 server.sh
   -rwxr-xr-x  1 szetszwo  staff  1598 Jan 22  2020 start-all.sh
   -rwxr-xr-x  1 szetszwo  staff   922 Jan 22  2020 stop-all.sh
   ```



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