Re: startup script. Some time ago I wrote this script below using for the
first part the standard prologue of plt scripts. The advantage being that
you can launch using a symbolic link to a symbolic link to a... So if you
are going to modify it you make consider this version as well:


#!/bin/sh
# Remember current directory
saveD=`pwd`
# Find absolute path to this script,# resolving symbolic references to
the end# (changes the current directory):
D=`dirname "$0"`
F=`basename "$0"`
cd "$D"while test -L "$F"; do
  P=`readlink "$F"`
  D=`dirname "$P"`
  F=`basename "$P"`
  cd "$D"done
D=`pwd`

cp=$D/h2-1.3.152.jarif [ -n "$H2DRIVERS" ] ; then
  cp="$cp:$H2DRIVERS"fiif [ -n "$CLASSPATH" ] ; then
  cp="$cp:$CLASSPATH"fi

cd $saveDexec java -cp "$cp" org.h2.tools.Console $@



On Thu, Dec 1, 2011 at 10:51 PM, Thomas Mueller <
[email protected]> wrote:

> Hi,
>
> Thanks a lot! I'm not an expert in shell scripts, but unless somebody
> objects I will apply your patch.
>
> Regards,
> Thomas
>
>
> On Mon, Nov 28, 2011 at 4:19 PM, Daniel Serodio <[email protected]>
> wrote:
> > The current h2.sh script only works if it's ran from within the "bin/"
> > directory of the distribution (ie ./h2.sh). This patch makes it work
> > from any directory (ie /opt/h2/bin/h2.sh):
> >
> > --- h2.sh       2011-11-28 13:14:20.000000000 -0200
> > +++ h2.sh.orig  2011-11-28 13:13:45.000000000 -0200
> > @@ -1,5 +1,7 @@
> >  #!/bin/sh
> > -cp=h2-1.3.162.jar
> > +dir="$(dirname $0)"
> > +cp="$dir/h2-1.3.162.jar"
> > +
> >  if [ -n "$H2DRIVERS" ] ; then
> >   cp="$cp:$H2DRIVERS"
> >  fi
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "H2 Database" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected].
> > For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>


-- 
   Vasile Rotaru

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to