Fix dictionary download on mac when osx-bundle is run more than once

This commit is contained in:
arch1t3cht 2023-09-12 14:57:42 +02:00
parent 4a97bb0dd2
commit d10ffebe35
1 changed files with 6 additions and 4 deletions

View File

@ -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