Skip to content

Commit

Permalink
Merge pull request lsc-project#269 from Worteks/master
Browse files Browse the repository at this point in the history
fix: sample code doesn't run from Debian package
  • Loading branch information
coudot authored May 28, 2024
2 parents cba14a0 + a96b953 commit dca8b07
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion sample/hsqldb/bin/lsc-sample
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ if [ ${SAMPLE_HOME:0:1} != "/" ] ; then
fi

# HSQLDB jar file
HSQLDB_LIB=`ls $SAMPLE_HOME/../../lib/hsqldb*.jar`
[ -z "$HSQLDB_LIB" -a -e $SAMPLE_HOME/../../lib/hsqldb*.jar ] && HSQLDB_LIB=`ls $SAMPLE_HOME/../../lib/hsqldb*.jar`
[ -z "$HSQLDB_LIB" -a -e $SAMPLE_HOME/../lib/lsc/hsqldb*.jar ] && HSQLDB_LIB=`ls $SAMPLE_HOME/../lib/lsc/hsqldb*.jar`
[ -z "$HSQLDB_LIB" ] && echo "hsqldb driver (hsqldb*.jar) is missing" && exit 1
# Temporary directory so that HSQLDB server could store files
HSQLDB_DIR=/tmp/lsc/hsqldb
# HSQLDB configuration file
Expand Down Expand Up @@ -243,6 +245,10 @@ run_java_command()
LDAPCP="$LDAPCP:$jar"
done

for jar in "$SAMPLE_HOME"/../lib/lsc/*.jar; do
LDAPCP="$LDAPCP:$jar"
done

# is this Cygwin? if so, convert path to Windows format for the JVM
CYGPATH_COMMAND="$(which cygpath 2>/dev/null)"
if [ -e "$CYGPATH_COMMAND" ]; then
Expand Down
8 changes: 7 additions & 1 deletion sample/ldap2hsqldb/bin/lsc-sample
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ if [ ${SAMPLE_HOME:0:1} != "/" ] ; then
fi

# HSQLDB jar file
HSQLDB_LIB=`ls $SAMPLE_HOME/../../lib/hsqldb*.jar`
[ -z "$HSQLDB_LIB" -a -e $SAMPLE_HOME/../../lib/hsqldb*.jar ] && HSQLDB_LIB=`ls $SAMPLE_HOME/../../lib/hsqldb*.jar`
[ -z "$HSQLDB_LIB" -a -e $SAMPLE_HOME/../lib/lsc/hsqldb*.jar ] && HSQLDB_LIB=`ls $SAMPLE_HOME/../lib/lsc/hsqldb*.jar`
[ -z "$HSQLDB_LIB" ] && echo "hsqldb driver (hsqldb*.jar) is missing" && exit 1
# Temporary directory so that HSQLDB server could store files
HSQLDB_DIR=/tmp/lsc/hsqldb
# HSQLDB configuration file
Expand Down Expand Up @@ -182,6 +184,10 @@ run_java_command()
LDAPCP="$LDAPCP:$jar"
done

for jar in "$SAMPLE_HOME"/../lib/lsc/*.jar; do
LDAPCP="$LDAPCP:$jar"
done

# is this Cygwin? if so, convert path to Windows format for the JVM
CYGPATH_COMMAND="$(which cygpath 2>/dev/null)"
if [ -e "$CYGPATH_COMMAND" ]; then
Expand Down

0 comments on commit dca8b07

Please sign in to comment.