Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions import-marc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,26 @@ then
SOLRJ_DIR="$VUFIND_HOME/solr/vendor/.solrj"
fi

if [ -d "$SOLRJ_DIR" ]
then
# validate the .solrj symlinks in case an upgrade has messed something up:
find $SOLRJ_DIR -type l ! -exec test -e {} \; -print | grep . > /dev/null
if [ $? -eq 0 ]
then
echo "Bad symlinks found in $SOLRJ_DIR; regenerating directory..."
find $SOLRJ_DIR -type l -exec rm {} \+
REGENERATE_SOLRJ_DIR=1
fi
fi

if [ ! -d "$SOLRJ_DIR" ]
then
mkdir -p $SOLRJ_DIR
REGENERATE_SOLRJ_DIR=1
fi

if [ $REGENERATE_SOLRJ_DIR -eq 1 ]
then
for file in $VUFIND_HOME/solr/vendor/server/solr-webapp/webapp/WEB-INF/lib/solr*.jar $VUFIND_HOME/solr/vendor/server/solr-webapp/webapp/WEB-INF/lib/http*.jar
do
ln -s $file $SOLRJ_DIR/`basename "$file"`
Expand Down