Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / main.aap
blob16b8b407e22dfad448c475d8d5caa0d90fceb9de
1 # This recipe checks whether the runtime files use "unix" or "dos" fileformat.
2 # Then it includes either getdos.aap or getunix.aap.
4 :recipe {fetch = ftp://ftp.vim.org/pub/vim/runtime/main.aap}
6 @dos = 0
7 @try:
8 @   f = open("filetype.vim", "rb")
9 @   line = f.read(200)
10 @   for c in line:
11 @      if c == '\r':
12 @          dos = 1
13 @except:
14 @   if _no.OSTYPE == "mswin" or _no.OSTYPE == "msdos" or _no.OSTYPE == "os2" or _no.OSTYPE == "ce":
15 @      dos = 1
16        :print Cannot read "filetype.vim", guessing fileformat is "dos".
17 @   else:
18        :print Cannot read "filetype.vim", guessing fileformat is "unix".
20 @if dos:
21     :include getdos.aap {fetch = ftp://ftp.vim.org/pub/vim/runtime/getdos.aap}
22 @else:
23     :include getunix.aap {fetch = ftp://ftp.vim.org/pub/vim/runtime/getunix.aap}