#!/bin/bash # releases are here: # https://stanfordnlp.github.io/CoreNLP/history.html VERSION=4.5.8 FILE="stanford-corenlp-${VERSION}.zip" DIR_V="stanford-corenlp-${VERSION}" DIR="stanford-corenlp-current" URL="http://nlp.stanford.edu/software/${FILE}" # https://www.digitalocean.com/community/tutorials/workflow-downloading-files-curl [ ! -f ${FILE} ] && echo 'Fetching file' && curl -L -o ${FILE} ${URL} [ ! -d ${DIR_V} ] && echo 'Unzipping file' && unzip ./${FILE} [ ! -L ${DIR} ] && echo "Symlinking ${DIR_V} -> ${DIR}" && ln -s ${DIR_V} ${DIR} [ ! -f ${DIR}/startServer.sh ] && echo "Copying startServer.sh" && cp ./startServer.sh ${DIR}/ echo "You can now build with: docker build -t cgenie/corenlp-garg:${VERSION}" --pull .