annotate runtime/spell/hr/main.aap @ 19749:cc2f523c1828

Added tag v8.2.0430 for changeset d089bd9511c0aa1ac40ed4aa793a8a3c68ffaca5
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Mar 2020 21:30:05 +0100
parents 52e76e2b5b65
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 481
diff changeset
1 # Aap recipe for Croatian Vim spell files.
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
2
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
3 # Use a freshly compiled Vim if it exists.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
4 @if os.path.exists('../../../src/vim'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
5 VIM = ../../../src/vim
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
6 @else:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
7 :progsearch VIM vim
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
8
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
9 SPELLDIR = ..
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
10 FILES = hr_HR.aff hr_HR.dic
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
11
502
52e76e2b5b65 updated for version 7.0140
vimboss
parents: 482
diff changeset
12 all: $SPELLDIR/hr.iso-8859-2.spl $SPELLDIR/hr.utf-8.spl \
52e76e2b5b65 updated for version 7.0140
vimboss
parents: 482
diff changeset
13 $SPELLDIR/hr.cp1250.spl ../README_hr.txt
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
14
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 481
diff changeset
15 $SPELLDIR/hr.iso-8859-2.spl : $FILES
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
16 :sys env LANG=hr_HR.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hr hr_HR" -c q
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
17
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 481
diff changeset
18 $SPELLDIR/hr.utf-8.spl : $FILES
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
19 :sys env LANG=hr_HR.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hr hr_HR" -c q
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
20
482
6f8b578776ab updated for version 7.0131
vimboss
parents: 481
diff changeset
21 $SPELLDIR/hr.cp1250.spl : $FILES
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
22 :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/hr hr_HR" -c q
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
23
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
24 ../README_hr.txt: README_hr_HR.txt
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
25 :copy $source $target
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
26
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
27 #
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
28 # Fetching the files from OpenOffice.org.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
29 #
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
30 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
31 :attr {fetch = $OODIR/%file%} hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
32
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
33 # The files don't depend on the .zip file so that we can delete it.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
34 # Only download the zip file if the targets don't exist.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
35 # This is a bit tricky, since the file name includes the date.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
36 hr_HR.aff hr_HR.dic: {buildcheck=}
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
37 :assertpkg unzip patch
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
38 :fetch hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
39 :sys $UNZIP hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
40 :delete hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
41 @if not os.path.exists('hr_HR.orig.aff'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
42 :copy hr_HR.aff hr_HR.orig.aff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
43 @if not os.path.exists('hr_HR.orig.dic'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
44 :copy hr_HR.dic hr_HR.orig.dic
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
45 @if os.path.exists('hr_HR.diff'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
46 :sys patch <hr_HR.diff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
47
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
48
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
49 # Generate diff files, so that others can get the OpenOffice files and apply
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
50 # the diffs to get the Vim versions.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
51
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
52 diff:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
53 :assertpkg diff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
54 :sys {force} diff -a -C 1 hr_HR.orig.aff hr_HR.aff >hr_HR.diff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
55 :sys {force} diff -a -C 1 hr_HR.orig.dic hr_HR.dic >>hr_HR.diff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
56
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
57
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
58 # Check for updated spell files. When there are changes the
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
59 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
60
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
61 check:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
62 :assertpkg unzip diff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
63 :fetch hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
64 :mkdir tmp
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
65 :cd tmp
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
66 @try:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
67 @import stat
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
68 :sys $UNZIP ../hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
69 :sys {force} diff ../hr_HR.orig.aff hr_HR.aff >d
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
70 @if os.stat('d')[stat.ST_SIZE] > 0:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
71 :copy hr_HR.aff ../hr_HR.new.aff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
72 :sys {force} diff ../hr_HR.orig.dic hr_HR.dic >d
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
73 @if os.stat('d')[stat.ST_SIZE] > 0:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
74 :copy hr_HR.dic ../hr_HR.new.dic
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
75 @finally:
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
76 :cd ..
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
77 :delete {r}{f}{q} tmp
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
78 :delete hr_HR.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
79
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
80
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
81 # vim: set sts=4 sw=4 :