From f9bc1db3284f2bf05f7b1cf55ab912363c6e8440 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 19 Sep 2019 00:17:16 +0300 Subject: Use variables as much as possible --- get_embeddings.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'get_embeddings.sh') diff --git a/get_embeddings.sh b/get_embeddings.sh index daf839b..47a7a8e 100755 --- a/get_embeddings.sh +++ b/get_embeddings.sh @@ -25,6 +25,7 @@ set -o errexit -o pipefail -o noclobber -o nounset ROOT="$(pwd)" EMBS="${ROOT}/embeddings" +DICT="${ROOT}/dictionaries" mkdir -p "${EMBS}" echo "Downloading embeddings" @@ -58,15 +59,15 @@ if [ ! "$(ls -A "${ROOT}/vecmap/")" ]; then echo "VecMap directory seems empty, did you run git submodule init && git submodule update?"; exit fi -if [ ! -d "${ROOT}/dictionaries" ]; then +if [ ! -d "${DICT}" ]; then echo "Dictionaries directory does not exist, did you run ./get_data.sh?"; exit fi -if [ ! "$(ls -A "${ROOT}/dictionaries/")" ]; then +if [ ! "$(ls -A "${DICT}")" ]; then echo "Dictionaries directory seems empty, did you run ./get_data.sh?"; exit fi -TRAIN_DIC_DIR="${ROOT}/dictionaries/train" +TRAIN_DIC_DIR="${DICT}/train" MAP_TO="${ROOT}/bilingual_embeddings" mkdir -p "${MAP_TO}" -- cgit v1.2.3-70-g09d2