Skip to content
This repository was archived by the owner on Oct 12, 2018. It is now read-only.

Commit 542d5ab

Browse files
author
Daniel Davis
committed
Change bin/convert-saxon work if invoked from a different directory.
1 parent 4499e40 commit 542d5ab

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

bin/convert-saxon.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
#!/bin/bash
22

3-
MYDIR=`basename $PWD`
4-
MYPROG=`basename $0`
53

6-
if [ "$MYDIR" == "bin" ];
7-
then
8-
MYDIR=".."
9-
else
10-
MYDIR="."
11-
fi
4+
MYDIR=`dirname $0`
5+
MYPROG=`basename $0`
126

13-
source $MYDIR/bin/marc2bibframe.conf
7+
source "$MYDIR/marc2bibframe.conf"
148

159
function usage {
1610
echo "Usage: $0 [-s serialization] [-u baseuri] [-j path-to-saxon-jar] marcxml-input-path output-path" 1>&2
@@ -64,5 +58,5 @@ OUTPUT=`readlink -f $2`
6458

6559
# Okay - run the conversion
6660

67-
java -cp $SAXON_JAR net.sf.saxon.Query $MYDIR/xbin/saxon.xqy marcxmluri="$MARCPATH" baseuri="$BASEURI" serialization="$SERIALIZATION" 1>$OUTPUT
61+
java -cp $SAXON_JAR net.sf.saxon.Query $MYDIR/../xbin/saxon.xqy marcxmluri="$MARCPATH" baseuri="$BASEURI" serialization="$SERIALIZATION" 1>$OUTPUT
6862

0 commit comments

Comments
 (0)