diff --git a/tools/osx-bundle.sh b/tools/osx-bundle.sh index a1563a481..29e0fbfd9 100755 --- a/tools/osx-bundle.sh +++ b/tools/osx-bundle.sh @@ -61,10 +61,12 @@ echo "---- Copying dictionaries ----" if test -f "${DICT_DIR}"; then cp -v "${DICT_DIR}/*" "${PKG_DIR}/Contents/SharedSupport/dictionaries" else - echo "Specified dictionary directory ${DICT_DIR} not found. Downloading dictionaries:" - mkdir "${BUILD_DIR}/dictionaries" - curl -L "https://downloads.sourceforge.net/project/openofficeorg.mirror/contrib/dictionaries/en_US.zip" -o "${BUILD_DIR}/dictionaries/en_US.zip" - unzip "${BUILD_DIR}/dictionaries/en_US.zip" -d "${BUILD_DIR}/dictionaries" + mkdir -p "${BUILD_DIR}/dictionaries" + if ! test -f "${BUILD_DIR}/dictionaries/en_US.aff"; then + echo "Specified dictionary directory ${DICT_DIR} not found. Downloading dictionaries:" + curl -L "https://downloads.sourceforge.net/project/openofficeorg.mirror/contrib/dictionaries/en_US.zip" -o "${BUILD_DIR}/dictionaries/en_US.zip" + unzip "${BUILD_DIR}/dictionaries/en_US.zip" -d "${BUILD_DIR}/dictionaries" + fi cp -v "${BUILD_DIR}/dictionaries/en_US.aff" "${PKG_DIR}/Contents/SharedSupport/dictionaries" cp -v "${BUILD_DIR}/dictionaries/en_US.dic" "${PKG_DIR}/Contents/SharedSupport/dictionaries" fi