You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/15 05:56:21 UTC

[GitHub] [pulsar] tisonkun commented on a diff in pull request #16332: [improve][cli] Pulsar shell: include pulsar-shell in released tarballs - part 2

tisonkun commented on code in PR #16332:
URL: https://github.com/apache/pulsar/pull/16332#discussion_r921836009


##########
bin/pulsar-shell:
##########
@@ -18,7 +18,19 @@
 # under the License.
 #
 
-BINDIR=$(dirname "$0")
+# need this for relative symlinks
+PRG="$0"
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG="`dirname "$PRG"`/$link"
+  fi
+done

Review Comment:
   @nicoloboschi may I ask a concrete usage of this change? It seems other scripts all use `BINDIR=$(dirname "$0")`.



-- 
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: commits-unsubscribe@pulsar.apache.org

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