diff --git a/build/Makefile b/build/Makefile index 5113996..ba3d85d 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,5 +1,3 @@ -.PHONY: all release build transcrypt copy $(RES_LESS_FILE) $(RES_PY_FILE) $(RES_HTML_FILE) $(RES_XML_FILE) - SRC_FOLDER=$(CURDIR)/../src RES_FOLDER=$(CURDIR)/../res @@ -20,6 +18,7 @@ RES_PY_FILE=$(SRC_FOLDER)/$(PY_FILE) RES_HTML_FILE=$(RES_FOLDER)/$(HTML_FILE) RES_XML_FILE=$(RES_FOLDER)/$(XML_FILE) +.PHONY: all release build transcrypt copy $(RES_LESS_FILE) $(RES_PY_FILE) $(RES_HTML_FILE) $(RES_XML_FILE) $(CONV_FILE) .DEFAULT_GOAL := all all: BR_FLAGS := $(BR_FLAGS) --debug diff --git a/build/download_structure_conversions.sh b/build/download_structure_conversions.sh index e313eb9..db8540a 100755 --- a/build/download_structure_conversions.sh +++ b/build/download_structure_conversions.sh @@ -3,15 +3,19 @@ # fail if any command fails set -e +OUT_FILE=conversions.csv + if [[ -z "${API_KEY}" ]]; then echo "API_KEY not defined, should be api key to CJVT's gitea" exit 1 fi -OUT_FILE=conversions.csv -TEMP_FILE=$(mktemp) +if [ -f $OUT_FILE ]; then + echo "file for conversion of SKE collocations: '$OUT_FILE' already exists, skipping." + exit 0 +fi -rm -r $OUT_FILE +TEMP_FILE=$(mktemp) curl -s "https://gitea.cjvt.si/api/v1/repos/generic/data_admin/contents/resources/structure_conversions.csv?token=$API_KEY" -o $TEMP_FILE echo "wc: $(wc $TEMP_FILE)"