Mercurial > vim
comparison runtime/spell/eo/main.aap @ 482:6f8b578776ab v7.0131
updated for version 7.0131
author | vimboss |
---|---|
date | Tue, 16 Aug 2005 23:01:50 +0000 |
parents | |
children | b9e314fe473f |
comparison
equal
deleted
inserted
replaced
481:66080ac5dab7 | 482:6f8b578776ab |
---|---|
1 # Aap recipe for Esperanto Vim spell files. | |
2 | |
3 # Use a freshly compiled Vim if it exists. | |
4 @if os.path.exists('../../../src/vim'): | |
5 VIM = ../../../src/vim | |
6 @else: | |
7 :progsearch VIM vim | |
8 | |
9 SPELLDIR = .. | |
10 FILES = eo_l3.aff eo_l3.dic | |
11 | |
12 all: $SPELLDIR/eo.iso-8859-3.spl $SPELLDIR/eo.utf-8.spl ../README_eo.txt | |
13 | |
14 $SPELLDIR/eo.iso-8859-3.spl : $FILES | |
15 :sys $VIM -u NONE -e -c "set enc=iso-8859-3" | |
16 -c "mkspell! $SPELLDIR/eo eo_l3" -c q | |
17 | |
18 $SPELLDIR/eo.utf-8.spl : $FILES | |
19 :sys $VIM -u NONE -e -c "set enc=utf-8" | |
20 -c "mkspell! $SPELLDIR/eo eo_l3" -c q | |
21 | |
22 ../README_eo.txt : README_eo_l3.txt | |
23 :copy $source $target | |
24 # fix missing newline | |
25 :sys $VIM $target -e -c "set ff=unix" -c wq | |
26 | |
27 # | |
28 # Fetching the files from OpenOffice.org. | |
29 # | |
30 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries | |
31 :attr {fetch = $OODIR/%file%} eo.zip | |
32 | |
33 # The files don't depend on the .zip file so that we can delete it. | |
34 # Only download the zip file if the targets don't exist. | |
35 eo_l3.aff eo_l3.dic: {buildcheck=} | |
36 :assertpkg unzip patch | |
37 :fetch eo.zip | |
38 :sys $UNZIP eo.zip | |
39 :delete eo.zip | |
40 @if not os.path.exists('eo_l3.orig.aff'): | |
41 :copy eo_l3.aff eo_l3.orig.aff | |
42 @if not os.path.exists('eo_l3.orig.dic'): | |
43 :copy eo_l3.dic eo_l3.orig.dic | |
44 @if os.path.exists('eo_l3.diff'): | |
45 :sys patch <eo_l3.diff | |
46 | |
47 | |
48 # Generate diff files, so that others can get the OpenOffice files and apply | |
49 # the diffs to get the Vim versions. | |
50 | |
51 diff: | |
52 :assertpkg diff | |
53 :sys {force} diff -a -C 1 eo_l3.orig.aff eo_l3.aff >eo_l3.diff | |
54 :sys {force} diff -a -C 1 eo_l3.orig.dic eo_l3.dic >>eo_l3.diff | |
55 | |
56 | |
57 # Check for updated OpenOffice spell files. When there are changes the | |
58 # ".new.aff" and ".new.dic" files are left behind for manual inspection. | |
59 | |
60 check: | |
61 :assertpkg unzip diff | |
62 :fetch eo.zip | |
63 :mkdir tmp | |
64 :cd tmp | |
65 @try: | |
66 @import stat | |
67 :sys $UNZIP ../eo.zip | |
68 :sys {force} diff ../eo_l3.orig.aff eo_l3.aff >d | |
69 @if os.stat('d')[stat.ST_SIZE] > 0: | |
70 :copy eo_l3.aff ../eo_l3.new.aff | |
71 :sys {force} diff ../eo_l3.orig.dic eo_l3.dic >d | |
72 @if os.stat('d')[stat.ST_SIZE] > 0: | |
73 :copy eo_l3.dic ../eo_l3.new.dic | |
74 @finally: | |
75 :cd .. | |
76 :delete {r}{f}{q} tmp | |
77 :delete eo.zip | |
78 | |
79 | |
80 # vim: set sts=4 sw=4 : |