annotate runtime/spell/tr/main.aap @ 29598:b838b8a9b726

Added tag v9.0.0139 for changeset f2d7f20d83c3939699545fa9fad85bfb65465662
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Aug 2022 16:15:09 +0200
parents e9a47bcf7b94
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18594
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 # Aap recipe for Turkish Vim spell files.
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 # Use a freshly compiled Vim if it exists.
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 @if os.path.exists('../../../src/vim'):
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 VIM = ../../../src/vim
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 @else:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 :progsearch VIM vim
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 SPELLDIR = ..
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 FILES = tr_TR.aff tr_TR.dic
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 all: $SPELLDIR/tr.utf-8.spl
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 $SPELLDIR/tr.utf-8.spl : $FILES
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 :sys env LANG=tr_TR.UTF-8
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 $VIM -u NONE -e -c "mkspell! $SPELLDIR/tr tr_TR" -c q
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 # Fetching LibreOffice spell files
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 FILE = https://github.com/bitigchi/bitigchi.github.io/raw/master/vim-tr-spell/tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 :attr {fetch = $FILE} tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 # The files don't depend on the .zip file so that we can delete it.
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 # Only download the zip file if the targets don't exist.
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 tr_TR.aff tr_TR.dic: {buildcheck=}
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 :assertpkg unzip patch
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 :fetch tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 :sys $UNZIP tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 :delete tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 @if not os.path.exists('tr_TR.orig.aff'):
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 :copy tr_TR.aff tr_TR.orig.aff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 @if not os.path.exists('tr_TR.orig.dic'):
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 :copy tr_TR.dic tr_TR.orig.dic
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 @if os.path.exists('tr_TR.diff'):
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 :sys patch <tr_TR.diff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 # Generate diff files
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 diff:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 :assertpkg diff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 :sys {force} diff -a -C 1 tr_TR.orig.aff tr_TR.aff >tr_TR.diff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 :sys {force} diff -a -C 1 tr_TR.orig.dic tr_TR.dic >>tr_TR.diff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 # Check for updated LibreOffice spell files. When there are changes the
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 check:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 :assertpkg unzip diff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 :fetch tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 :mkdir tmp
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 :cd tmp
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 @try:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 @import stat
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 :sys $UNZIP ../tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 :sys {force} diff ../tr_TR.orig.aff tr_TR.aff >d
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 @if os.stat('d')[stat.ST_SIZE] > 0:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 :copy tr_TR.aff ../tr_TR.new.aff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 :sys {force} diff ../tr_TR.orig.dic tr_TR.dic >d
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 @if os.stat('d')[stat.ST_SIZE] > 0:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 :copy tr_TR.dic ../tr_TR.new.dic
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 @finally:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 :cd ..
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 :delete {r}{f}{q} tmp
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 :delete tr_TR.zip
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 # Remove all the downloaded and generated files.
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 clean:
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 :delete tr_TR.aff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 :delete tr_TR.dic
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 :delete tr_TR.orig.aff
e9a47bcf7b94 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 :delete tr_TR.orig.dic