annotate runtime/spell/cs/main.aap @ 27970:212c5894b8b1 v8.2.4510

patch 8.2.4510: Vim9: shortening commands leads to confusing script Commit: https://github.com/vim/vim/commit/204852ae2adfdde10c656ca7f14e5b4207a69172 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 5 12:56:44 2022 +0000 patch 8.2.4510: Vim9: shortening commands leads to confusing script Problem: Vim9: shortening commands leads to confusing script. Solution: In Vim9 script require at least ":cont" for ":continue", "const" instead of "cons", "break" instead of "brea", "catch" instead of "cat", "else" instead of "el" "elseif" instead of "elsei" "endfor" instead of "endfo" "endif" instead of "en" "endtry" instead of "endt", "finally" instead of "fina", "throw" instead of "th", "while" instead of "wh".
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Mar 2022 14:00:03 +0100
parents 6f8b578776ab
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
1 # Aap recipe for Czech Vim spell files.
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 = cs_CZ.aff cs_CZ.dic
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
11
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
12 all: $SPELLDIR/cs.iso-8859-2.spl $SPELLDIR/cs.utf-8.spl \
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
13 $SPELLDIR/cs.cp1250.spl ../README_cs.txt
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/cs.iso-8859-2.spl : $FILES
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
16 :sys env LANG=cs_CZ.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/cs cs_CZ" -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/cs.utf-8.spl : $FILES
481
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
19 :sys env LANG=cs_CZ.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/cs cs_CZ" -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/cs.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/cs cs_CZ" -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_cs.txt: README_cs_CZ.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%} cs_CZ.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 cs_CZ.aff cs_CZ.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 cs_CZ.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
39 :sys $UNZIP cs_CZ.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
40 :delete cs_CZ.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
41 @if not os.path.exists('cs_CZ.orig.aff'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
42 :copy cs_CZ.aff cs_CZ.orig.aff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
43 @if not os.path.exists('cs_CZ.orig.dic'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
44 :copy cs_CZ.dic cs_CZ.orig.dic
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
45 @if os.path.exists('cs_CZ.diff'):
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
46 :sys patch <cs_CZ.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 cs_CZ.orig.aff cs_CZ.aff >cs_CZ.diff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
55 :sys {force} diff -a -C 1 cs_CZ.orig.dic cs_CZ.dic >>cs_CZ.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 OpenOffice 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 cs_CZ.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 ../cs_CZ.zip
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
69 :sys {force} diff ../cs_CZ.orig.aff cs_CZ.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 cs_CZ.aff ../cs_CZ.new.aff
66080ac5dab7 updated for version 7.0130
vimboss
parents:
diff changeset
72 :sys {force} diff ../cs_CZ.orig.dic cs_CZ.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 cs_CZ.dic ../cs_CZ.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 cs_CZ.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 :