From 0434bcb18df27d4e6331808eb0415b5367443a5a6a39e9d83a1c0a6967112921 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 12 May 2014 09:06:16 +0000 Subject: [PATCH] - improve thesaurus link names OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/myspell-dictionaries?expand=0&rev=16 --- dictionaries.tar.xz | 4 ++-- myspell-dictionaries.changes | 5 +++++ update.sh | 18 ++++++++++++++---- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/dictionaries.tar.xz b/dictionaries.tar.xz index 44de4c8..726b966 100644 --- a/dictionaries.tar.xz +++ b/dictionaries.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b82b36bb0d0e0d8df2fc2307f1f6b9b45834a82b57e1a5d9b93c2cfa910651d -size 40909140 +oid sha256:815d7e029e69fe8996ddfa5d41f5c2b3b2d5b3db0687a8ba378564c7711339e4 +size 148817900 diff --git a/myspell-dictionaries.changes b/myspell-dictionaries.changes index 558e033..a07ba68 100644 --- a/myspell-dictionaries.changes +++ b/myspell-dictionaries.changes @@ -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 diff --git a/update.sh b/update.sh index eca3305..856ce2c 100644 --- a/update.sh +++ b/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