- updated to 20140507
* fdo#73544 update catalan linguistic components - improve dictionary file names OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/myspell-dictionaries?expand=0&rev=15
This commit is contained in:
parent
6a6fd4fe8e
commit
f29717b10f
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:8e5870534e61833b3296cd3429643e545edec753e516ce52fe336c96914694bb
|
oid sha256:3b82b36bb0d0e0d8df2fc2307f1f6b9b45834a82b57e1a5d9b93c2cfa910651d
|
||||||
size 40905732
|
size 40909140
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 7 09:24:10 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- updated to 20140507
|
||||||
|
* fdo#73544 update catalan linguistic components
|
||||||
|
- improve dictionary file names
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 6 15:22:09 UTC 2014 - pgajdos@suse.com
|
Tue May 6 15:22:09 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
## Generate: sh update.sh
|
## Generate: sh update.sh
|
||||||
###################################################################
|
###################################################################
|
||||||
Name: myspell-dictionaries
|
Name: myspell-dictionaries
|
||||||
Version: 20140417
|
Version: 20140507
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Source Package for Dictionaries Used by MySpell
|
Summary: A Source Package for Dictionaries Used by MySpell
|
||||||
License: AGPL-3.0 and BSD-2-Clause and BSD-3-Clause and BSD-4-Clause and CC-BY-SA-1.0 and CC-BY-SA-3.0 and GFDL-1.1 and GPL-2.0 and GPL-2.0+ and GPL-3.0 and GPL-3.0+ and LGPL-2.0 and LGPL-2.1 and LGPL-2.1+ and LGPL-3.0 and LGPL-3.0+ and MPL-1.1
|
License: AGPL-3.0 and BSD-2-Clause and BSD-3-Clause and BSD-4-Clause and CC-BY-SA-1.0 and CC-BY-SA-3.0 and GFDL-1.1 and GPL-2.0 and GPL-2.0+ and GPL-3.0 and GPL-3.0+ and LGPL-2.0 and LGPL-2.1 and LGPL-2.1+ and LGPL-3.0 and LGPL-3.0+ and MPL-1.1
|
||||||
@ -994,7 +994,6 @@ function install_dictionary_files
|
|||||||
|
|
||||||
if [ ! -z "$files" ]; then
|
if [ ! -z "$files" ]; then
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
echo "LOCALE: $locale_dir SYSTEM_DIR: $system_dir FILE: $file"
|
|
||||||
# install file
|
# install file
|
||||||
cp -P $file %{buildroot}%{_datadir}/$system_dir/
|
cp -P $file %{buildroot}%{_datadir}/$system_dir/
|
||||||
# symlink
|
# symlink
|
||||||
|
@ -194,7 +194,6 @@ function install_dictionary_files
|
|||||||
|
|
||||||
if [ ! -z "$files" ]; then
|
if [ ! -z "$files" ]; then
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
echo "LOCALE: $locale_dir SYSTEM_DIR: $system_dir FILE: $file"
|
|
||||||
# install file
|
# install file
|
||||||
cp -P $file %{buildroot}%{_datadir}/$system_dir/
|
cp -P $file %{buildroot}%{_datadir}/$system_dir/
|
||||||
# symlink
|
# symlink
|
||||||
|
75
update.sh
75
update.sh
@ -51,11 +51,13 @@ declare -A provides_map=(
|
|||||||
["myspell-zu_ZA"]="myspell-zulu"
|
["myspell-zu_ZA"]="myspell-zulu"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# directories under $GIT_DIR, which holds dictionaries
|
||||||
function directories()
|
function directories()
|
||||||
{
|
{
|
||||||
ls $GIT_DIR/*/dictionaries.xcu | sed -e 's:dictionaries/::' -e 's:/dictionaries.xcu::' | tr '\n' ' '
|
ls $GIT_DIR/*/dictionaries.xcu | sed -e 's:dictionaries/::' -e 's:/dictionaries.xcu::' | tr '\n' ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# create central mapping dir <-> locales <-> files
|
||||||
function locale_to_file_map()
|
function locale_to_file_map()
|
||||||
{
|
{
|
||||||
cd $GIT_DIR
|
cd $GIT_DIR
|
||||||
@ -78,18 +80,29 @@ function locale_to_file_map()
|
|||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# for given dir: which locales provides
|
||||||
function dir_locales()
|
function dir_locales()
|
||||||
{
|
{
|
||||||
dir=$1
|
dir=$1
|
||||||
grep "^$dir:" $GIT_DIR/locale_to_file_map.txt | sed 's/.*: //' | sed 's/ @.*//' | tr ' ' '\n' | sort -u | tr '\n' ' '
|
grep "^$dir:" $GIT_DIR/locale_to_file_map.txt | sed 's/.*: //' | sed 's/ @.*//' | tr ' ' '\n' | sort -u | tr '\n' ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
function locale_files()
|
# for given dir: which dictionary relevant files (dic, aff, th*, hyph*) provides
|
||||||
|
function dir_files()
|
||||||
{
|
{
|
||||||
loc=$1
|
dir=$1
|
||||||
grep $loc $GIT_DIR/locale_to_file_map.txt | sed 's:.*@ ::' | tr ' ' '\n' | sort -u | tr '\n' ' '
|
grep "$dir:" $GIT_DIR/locale_to_file_map.txt | sed 's:.*@ ::' | tr ' ' '\n' | sort -u | tr '\n' ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# for given dictionary file: which locales provides
|
||||||
|
function file_locales()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
# there should be only one occurence of a file in locale_to_file_map.txt
|
||||||
|
grep $file $GIT_DIR/locale_to_file_map.txt | sed -e 's/.*: //' -e 's/@.*//'
|
||||||
|
}
|
||||||
|
|
||||||
|
# for given dir: description of the dictionary
|
||||||
function description()
|
function description()
|
||||||
{
|
{
|
||||||
dir=$1
|
dir=$1
|
||||||
@ -154,32 +167,44 @@ done
|
|||||||
echo '--- Creating symlinks'
|
echo '--- Creating symlinks'
|
||||||
# create symlinks in $GIT_DIR/$dir, e. g. es_GT -> es_ANY
|
# create symlinks in $GIT_DIR/$dir, e. g. es_GT -> es_ANY
|
||||||
for dir in $dirs; do
|
for dir in $dirs; do
|
||||||
dir_locs=$(dir_locales $dir)
|
files=$(dir_files $dir)
|
||||||
[ "$VERBOSE" == "yes" ] && echo "DICTIONARY: $dir ($dir_locs)"
|
[ "$VERBOSE" == "yes" ] && echo "DICTIONARY: $dir ($files)"
|
||||||
for l in $dir_locs; do
|
for file in $files; do
|
||||||
loc_files=$(locale_files $l)
|
locales=$(file_locales $file)
|
||||||
[ "$VERBOSE" == "yes" ] && echo " $l: $loc_files"
|
[ "$VERBOSE" == "yes" ] && echo " $file: $locales"
|
||||||
for f in $loc_files; do
|
for locale in $locales; do
|
||||||
f=`basename $f`
|
fname=`basename $file`
|
||||||
prefix=""
|
|
||||||
if [[ $f == hyph* ]] || [[ $f == th* ]]; then
|
|
||||||
# nice collision with th_ for thesaurus
|
|
||||||
if [ "$f" != "th_TH.aff" ] && [ "$f" != "th_TH.dic" ]; then
|
|
||||||
prefix=`echo $f | sed 's:_.*:_:'`
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
ext=`echo $f | sed 's:.*\.::'`
|
|
||||||
# file or link for this locale/extension exist yet, do not create symlink
|
|
||||||
if ls $GIT_DIR/$dir/$prefix*$l*.$ext &> /dev/null; then
|
|
||||||
continue;
|
|
||||||
fi
|
|
||||||
# work around which is bug imho in dictionaries.xcu.
|
# work around which is bug imho in dictionaries.xcu.
|
||||||
# It references file that doesn't exist.
|
# It references file that doesn't exist.
|
||||||
if [ ! -e "$GIT_DIR/$dir/$f" ]; then
|
if [ ! -e "$GIT_DIR/$dir/$fname" ]; then
|
||||||
|
[ "$VERBOSE" == "yes" ] && echo "WARNING: $GIT_DIR/$dir/$f doesn't exist"
|
||||||
continue;
|
continue;
|
||||||
fi
|
fi
|
||||||
linkname=$prefix$l.$ext
|
|
||||||
ln -sf $f $GIT_DIR/$dir/$linkname
|
prefix=""
|
||||||
|
if [[ $fname == th* ]]; then
|
||||||
|
# nice collision with th_ for thesaurus
|
||||||
|
if [ "$fname" != "th_TH.aff" ] && [ "$fname" != "th_TH.dic" ]; then
|
||||||
|
prefix="th_"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ $fname == hyph* ]]; then
|
||||||
|
prefix="hyph_"
|
||||||
|
fi
|
||||||
|
ext=`echo $fname | sed 's:.*\.::'`
|
||||||
|
linkname=$prefix$locale.$ext
|
||||||
|
|
||||||
|
[ "$VERBOSE" == "yes" ] && echo -n " link: $linkname -> $fname .. "
|
||||||
|
|
||||||
|
# regular file or link for this locale/extension exist yet,
|
||||||
|
# do not create symlink
|
||||||
|
if ls $GIT_DIR/$dir/$linkname &> /dev/null; then
|
||||||
|
echo "regular file or link exists yet"
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -sf $fname $GIT_DIR/$dir/$linkname
|
||||||
|
echo "created"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user