summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2007-05-07 16:29:59 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2007-05-07 16:29:59 +0000
commitcb9d66bfa8b84e4737009c3714f1374b96f725ba (patch)
tree4fa8d78a8ee79b8e7b8471bcbffef261858d723c /dev-db/henplus/files/henplus.pre
parentMigrate to split-ant. (diff)
downloadhistorical-cb9d66bfa8b84e4737009c3714f1374b96f725ba.tar.gz
historical-cb9d66bfa8b84e4737009c3714f1374b96f725ba.tar.bz2
historical-cb9d66bfa8b84e4737009c3714f1374b96f725ba.zip
Make the -pre file behave the same way as upstream wrapper script in populating CLASSPATH.
Package-Manager: portage-2.1.2.5
Diffstat (limited to 'dev-db/henplus/files/henplus.pre')
-rwxr-xr-xdev-db/henplus/files/henplus.pre23
1 files changed, 22 insertions, 1 deletions
diff --git a/dev-db/henplus/files/henplus.pre b/dev-db/henplus/files/henplus.pre
index 59b20bc3f176..c29585e369fa 100755
--- a/dev-db/henplus/files/henplus.pre
+++ b/dev-db/henplus/files/henplus.pre
@@ -1,3 +1,24 @@
+#
+# Based on the upstream script but parts not relevant to Gentoo
+# stripped away. We would not need this at all but better to make
+# this behave as the upstream docs say and then also have all the
+# Gentoo goodies.
+# https://bugs.gentoo.org/show_bug.cgi?id=176185
+
+##------------------
+THISDIR=`dirname $0`
+# install layout is: script in /usr/bin/henplus and libs in /usr/share/henplus
+HENPLUSDIR=$THISDIR/../share/henplus
+
+# you may just throw your own jar files in this dir.
+# (like additional JDBC-drivers, that are not in default
+# classpath)
+for f in $HENPLUSDIR/*.jar $HENPLUSDIR/*.zip ; do
+ if [ -r "$f" ] ; then
+ CLASSPATH=$CLASSPATH:$f
+ fi
+done
+
# starting at the current directory we look for additional
# JDBC-drivers in .henplus/lib-directories up the path.
# if no directory like that has been found the one in the
@@ -8,7 +29,7 @@ CUSTOM_HENPLUSDIR=""
while [ $DIR != "/" ] ; do
if [ -d $DIR"/.henplus/lib" ]; then
CUSTOM_HENPLUSDIR=$DIR"/.henplus/lib"
- break
+ break
fi
DIR=`dirname $DIR`
done