home *** CD-ROM | disk | FTP | other *** search
- # This recipe checks whether the runtime files use "unix" or "dos" fileformat.
- # Then it includes either getdos.aap or getunix.aap.
-
- :recipe {fetch = ftp://ftp.vim.org/pub/vim/runtime/main.aap}
-
- @dos = 0
- @try:
- @ f = open("filetype.vim", "rb")
- @ line = f.read(200)
- @ for c in line:
- @ if c == '\r':
- @ dos = 1
- @except:
- @ if _no.OSTYPE == "mswin" or _no.OSTYPE == "msdos" or _no.OSTYPE == "os2" or _no.OSTYPE == "ce":
- @ dos = 1
- :print Cannot read "filetype.vim", guessing fileformat is "dos".
- @ else:
- :print Cannot read "filetype.vim", guessing fileformat is "unix".
-
- @if dos:
- :include getdos.aap {fetch = ftp://ftp.vim.org/pub/vim/runtime/getdos.aap}
- @else:
- :include getunix.aap {fetch = ftp://ftp.vim.org/pub/vim/runtime/getunix.aap}
-