home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / runtime / main.aap < prev    next >
Encoding:
Text File  |  2010-08-15  |  783 b   |  24 lines

  1. # This recipe checks whether the runtime files use "unix" or "dos" fileformat.
  2. # Then it includes either getdos.aap or getunix.aap.
  3.  
  4. :recipe {fetch = ftp://ftp.vim.org/pub/vim/runtime/main.aap}
  5.  
  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".
  19.  
  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}
  24.