Martin,

On 12/11/20 04:02, Martin Grigorov wrote:
On Fri, Dec 11, 2020 at 10:53 AM Mark Thomas <ma...@apache.org> wrote:

On 11/12/2020 08:49, Martin Grigorov wrote:
On Fri, Dec 11, 2020 at 10:41 AM Martin Grigorov <mgrigo...@apache.org>
wrote:
On Fri, Dec 11, 2020 at 10:37 AM Rainer Jung <rainer.j...@kippdata.de>

<snip/>

Maybe one could

    cd `dirname $0`


Two issues with this:

1) the script usage is: ./bin/migrate.sh input.war output.war
if we "cd" into bin/ then input.war is not there anymore. Its path should
be fixed to ../input.war somehow

2) it would be good to leave the user back to the original directory
after
executing the script but pushd/popd are not available for 'sh'. We will
need to use Bash or another

You might find inspiration for a fix in the Tomcat startup scripts.


Do we need to fix it ? It works fine.

This looks weird to me:

> BIN_FOLDER=`dirname $PWD/$0`

Why not simply:

BIN_FOLDER=$( dirname $0 )

(I have converted to $(...) instead of `...` because the syntax is better, more navigable, allows nesting, etc.)

There shouldn't be any reason for the $PWD to be in there because the user's current working directory is irrelevant.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to