- improve thesaurus link names
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/myspell-dictionaries?expand=0&rev=16
This commit is contained in:
parent
f29717b10f
commit
0434bcb18d
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b82b36bb0d0e0d8df2fc2307f1f6b9b45834a82b57e1a5d9b93c2cfa910651d
|
||||
size 40909140
|
||||
oid sha256:815d7e029e69fe8996ddfa5d41f5c2b3b2d5b3db0687a8ba378564c7711339e4
|
||||
size 148817900
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 12 09:05:03 UTC 2014 - pgajdos@suse.com
|
||||
|
||||
- improve thesaurus link names
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 09:24:10 UTC 2014 - pgajdos@suse.com
|
||||
|
||||
|
18
update.sh
18
update.sh
@ -154,9 +154,14 @@ locale_to_file_map
|
||||
|
||||
# create *.idx files from *.dat files
|
||||
echo '--- Creating idx files'
|
||||
if [ ! -x /usr/bin/th_gen_idx.pl ]; then
|
||||
echo "ERROR: /usr/bin/th_gen_idx.pl not found"
|
||||
echo "Install mythes-devel package."
|
||||
exit 1
|
||||
fi
|
||||
for datf in $(dat_files); do
|
||||
idxf=$(idx_file $datf)
|
||||
echo "th_gen_idx.pl < $GIT_DIR/$datf > $GIT_DIR/$idxf"
|
||||
[ "$VERBOSE" == "yes" ] && echo "th_gen_idx.pl < $GIT_DIR/$datf > $GIT_DIR/$idxf"
|
||||
th_gen_idx.pl < $GIT_DIR/$datf > $GIT_DIR/$idxf
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: failed th_gen_idx.pl -o $GIT_DIR/$idxf < $GIT_DIR/$datf"
|
||||
@ -182,29 +187,34 @@ for dir in $dirs; do
|
||||
fi
|
||||
|
||||
prefix=""
|
||||
version=""
|
||||
if [[ $fname == th* ]]; then
|
||||
# nice collision with th_ for thesaurus
|
||||
if [ "$fname" != "th_TH.aff" ] && [ "$fname" != "th_TH.dic" ]; then
|
||||
prefix="th_"
|
||||
version=`echo $fname | sed 's:.*\(_v[0-9]\+\).*:\1:'`
|
||||
if [ $version == $fname ]; then
|
||||
version=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [[ $fname == hyph* ]]; then
|
||||
prefix="hyph_"
|
||||
fi
|
||||
ext=`echo $fname | sed 's:.*\.::'`
|
||||
linkname=$prefix$locale.$ext
|
||||
linkname=$prefix$locale$version.$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"
|
||||
[ "$VERBOSE" == "yes" ] && echo "regular file or link exists yet"
|
||||
continue;
|
||||
fi
|
||||
|
||||
ln -sf $fname $GIT_DIR/$dir/$linkname
|
||||
echo "created"
|
||||
[ "$VERBOSE" == "yes" ] && echo "created"
|
||||
done
|
||||
done
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user