Use repo root in update-citeproc.sh

This commit is contained in:
Dan Stillman 2023-04-23 05:05:39 -04:00 committed by Dan Stillman
parent 7ae79bbb98
commit 257a2280c1
3 changed files with 4 additions and 8 deletions

1
scripts/.gitignore vendored
View file

@ -1,2 +1 @@
config.sh
node_modules

View file

@ -1 +0,0 @@
export ZOTEROSRC="../zotero"

View file

@ -1,9 +1,7 @@
#!/bin/bash -e
ZOTEROSRC="../zotero"
if [ -e "./config.sh" ]; then
. ./config.sh
fi
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
tag=master
if [ -n "$1" ]; then
@ -12,10 +10,10 @@ fi
echo Downloading tag $tag
sleep 2
outFile="$ZOTEROSRC/chrome/content/zotero/xpcom/citeproc.js"
outFile="$ROOT_DIR/chrome/content/zotero/xpcom/citeproc.js"
if [ ! -e "$outFile" ]; then
>&2 echo "$outFile not found. Looking for Zotero source in $(readlink -f $ZOTEROSRC)"
>&2 echo "$outFile not found"
exit 78 # EX_CONFIG: configuration error (from sysexits.h)
fi