proper ML_DBASE for .../bin/poly;
authorwenzelm
Tue, 16 Aug 2005 13:42:17 +0200
changeset 17051 d17cfb0b9ba2
parent 17050 bfb571252817
child 17052 30781cc78fc6
proper ML_DBASE for .../bin/poly;
lib/scripts/run-polyml
--- a/lib/scripts/run-polyml	Tue Aug 16 13:42:16 2005 +0200
+++ b/lib/scripts/run-polyml	Tue Aug 16 13:42:17 2005 +0200
@@ -46,13 +46,18 @@
 check_file "$POLY"
 
 if [ -z "$ML_DBASE" ]; then
+  if [ ! -e "$ML_HOME/ML_dbase${ML_DBASE_SUFFIX}" -a "$(basename "$ML_HOME")" = bin ]; then
+    ML_DBASE_HOME="$(cd "$ML_HOME"; cd "$(pwd -P)"; cd ../lib/poly; pwd)"
+  else
+    ML_DBASE_HOME="$ML_HOME"
+  fi
   if [ -z "$COPYDB" ]; then
-    ML_DBASE_PREFIX="$ML_HOME/"
+    ML_DBASE_PREFIX="$ML_DBASE_HOME/"
     ML_DBASE="ML_dbase${ML_DBASE_SUFFIX}"
   else
-    ML_DBASE="$ML_HOME/ML_dbase${ML_DBASE_SUFFIX}"
+    ML_DBASE="$ML_DBASE_HOME/ML_dbase${ML_DBASE_SUFFIX}"
   fi
-  export POLYPATH="$(fixpath "$ML_HOME")"
+  export POLYPATH="$(fixpath "$ML_DBASE_HOME")"
 else
   export POLYPATH="$(fixpath "$(dirname "$ML_DBASE")")"
 fi