tis-vim

1.0-1
Vim is a clone, with additions, of Bill Joy's vi text editor program for Unix.
48 downloads
Download

  Description 

  • package : tis-vim
  • version : 1.0-1
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Jimmy PELÉ
  • description : Vim is a clone, with additions, of Bill Joy's vi text editor program for Unix.
  • locale :
  • target_os : linux
  • min_os_version :
  • max_os_version :
  • min_wapt_version : 1.8
  • sources : https://github.com/vim/vim
  • installed_size :
  • impacted_process : vi,vim
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor :
  • licence : Free software
  • signature_date : 2020-09-11T16:38:30.265282
  • Homepage : https://www.vim.org/

  Setup.py 

# -*- coding: utf-8 -*-
from setuphelpers import *
import platform

uninstallkey = []

# Declaring specific app values (TO CHANGE)
package_name = 'vim'
conf_file_content = """syntax on
set number
let g:skip_defaults_vim = 1
"""


def install():
    # Installing the package
    if platform.linux_distribution()[0].lower() in ['debian','ubuntu']:
        conf_file = makepath('/','etc','vim','vimrc')
        print('Installing deb package')
        install_apt(package_name)

    if platform.linux_distribution()[0].lower() in ['centos linux','centos','suse','fedora','redhat']:
        conf_file = makepath('/','etc','vimrc')
        print('Installing yum package')
        install_yum(package_name)

    # Editing default option of VIM
    if not isfile(conf_file):
        file_open = open(conf_file,'w')
        file_open.write(conf_file_content)
        file_open.close()
    else:
        with open(conf_file,'a+') as data:
            if not 'syntax on' in data.read():
                data.write('\nsyntax on')
        with open(conf_file,'a+') as data:
            if not 'set number' in data.read():
                data.write('\nset number')
        with open(conf_file,'a+') as data:
            if not 'let g:skip_defaults_vim = 1' in data.read():
                data.write('\nlet g:skip_defaults_vim = 1')


def uninstall():
    # Uninstalling the package
    if platform.linux_distribution()[0].lower() in ['debian','ubuntu']:
        print('Uninstalling deb package')
        uninstall_apt(package_name)

    if platform.linux_distribution()[0].lower() in ['centos linux','centos','suse','fedora','redhat']:
        print('Uninstalling yum package')
        uninstall_yum(package_name)


def update_package():
    pass
    # put here what to do to update package content with newer installers.
    # launched with command wapt-get update-package-sources <path-to-wapt-directory>
    # implicit context variables are WAPT, basedir, control, user, params, run
    # if attributes in control are changed, they should be explicitly saved to package file with control.save_control_to_wapt()


										

  Changelog 


No changelog
  manifest.sha256 
[["setup.py","bc1b1d02f422105ba3ce450b202b2b588b3fb12a17ff869fbfedebd395384271"],["WAPT/icon.png","b5c4b8b5426dfceb9931cfce83053abe8af08a603b719b50cb75c8de34486501"],["WAPT/certificate.crt","a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf"],["WAPT/control","9fad4c825da86e2722337d9c9e62f3b79df6703f94aa98accbd038de81b48583"]]