summaryrefslogtreecommitdiff
path: root/databases/liquibase/files/patch-liquibase
blob: 6c2ee5dc2668296becca76997b4a0973a1429aae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- liquibase.orig	2019-11-06 04:45:57 UTC
+++ liquibase
@@ -1,28 +1,6 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-if [ ! -n "${LIQUIBASE_HOME+x}" ]; then
-  # echo "LIQUIBASE_HOME is not set."
-
-  ## resolve links - $0 may be a symlink
-  PRG="$0"
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-    else
-    PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-
-  LIQUIBASE_HOME=`dirname "$PRG"`
-
-  # make it fully qualified
-  LIQUIBASE_HOME=`cd "$LIQUIBASE_HOME" && pwd`
-  # echo "Liquibase Home: $LIQUIBASE_HOME"
-fi
-
+LIQUIBASE_HOME=`readlink -f "$(dirname "$0")/../share/liquibase"`
  
 # build classpath from all jars in lib
 if [ -f /usr/bin/cygpath ]; then
@@ -36,17 +14,13 @@ if [ -f /usr/bin/cygpath ]; then
     CP="$CP;$i"
   done
 else
-  if [[ $(uname) = MINGW* ]]; then
+  if [ $(uname) = Msys ]; then
     CP_SEPARATOR=";"
   else
     CP_SEPARATOR=":"
   fi
   CP=.
-  for i in "$LIQUIBASE_HOME"/liquibase*.jar; do
-    CP="$CP""$CP_SEPARATOR""$i"
-  done
-  CP="$CP""$CP_SEPARATOR""$LIQUIBASE_HOME/lib/"
-  for i in "$LIQUIBASE_HOME"/lib/*.jar; do
+  for i in "$LIQUIBASE_HOME"/*.jar; do
     CP="$CP""$CP_SEPARATOR""$i"
   done
 fi