Bill Trost <trost at cloud.rain.com> wrote:
> The jar-based insert and request script contains a rather complicated
> loop at the top to determine the symlink-free path for the jar file.
> This loop contains non-portable uses of expr.  I'm wondering -- is there
> some particular reason that the absolute path to the script is being
> used?  If not, I'm tempted just to nuke that bit of complexity all
> together; otherwise, I will have to come up with a portable replacement
> for it.

The reason that's there is so the script can find the .jar in order to set
the classpath correctly.  I assume the .jar lives in the same directory as
the script, but this is not the case if script is invoked by a symlink, so
we traverse links to find the real location.  Ok, maybe supporting symlinks
is not that big a deal but it's kind of nice.  Sun's .java_wrapper does
this too, by the way.

The ordinary (non-jar) versions don't have this problem because we know the
path at install time and can substitute in for INSTALLDIR.  However, the
jar versions can just be unpacked anywhere and there is no install.  The
other option is to tell people to edit the script, but that's uncool.

theo


_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to