コード例 #1
0
ファイル: packages.py プロジェクト: yejianye/fabtask
def find_package_management_program():
    if env.get("install_package_command"):
        return
    if is_linux():
        if program_exists("apt-get"):
            env.install_package_command = "sudo apt-get install -y"
        elif program_exists("yum"):
            env.install_package_command = "sudo yum -y install"
    elif is_macos():
        ensure_homebrew()
        env.install_package_command = "brew install"
コード例 #2
0
ファイル: fabfile.py プロジェクト: yejianye/tools-config
def vim():
    # get vim version
    ensure_git_repo('.vim', 'git://github.com/yejianye/vim-setup.git', pushurl='[email protected]:yejianye/vim-setup.git', submodules=True)
    ensure_link('.vimrc_common', '~/.vim/.vimrc_common')
    ensure_file('.vimrc', append='source ~/.vimrc_common')
    # With Mac gcc and make should be installed with Xcode
    if not is_macos():
        ensure_package('gcc')
        ensure_package('make')
    with(cd('~/.vim/bundle/vimproc')):
        if is_macos():
            run('make -f make_mac.mak')
        elif is_linux():
            run('make -f make_unix.mak')
    # setup pushurl for submodules
    with(cd('~/.vim/bundle/textobj_function')):    
        run('git config remote.origin.pushurl [email protected]:yejianye/vim-textobj-function.git')
    with(cd('~/.vim/bundle/vim-ref-jquery')):
        run('git config remote.origin.pushurl [email protected]:yejianye/vim-ref-jquery.git')
    with(cd('~/.vim/bundle/syntastic')):
        run('git config remote.origin.pushurl [email protected]:yejianye/syntastic.git')
コード例 #3
0
ファイル: fabfile.py プロジェクト: yejianye/tools-config
def tmux():
    ensure_package('tmux')
    ensure_link('.tmux.conf', 'configs/.tmux.conf')
    if is_macos():
        if not program_exists('reattach-to-user-namespace'):
            ensure_git_repo('/tmp/reattach-to-user-namespace', 'git://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git')
            with cd('/tmp/reattach-to-user-namespace'):
                run('make reattach-to-user-namespace')
                run('cp reattach-to-user-namespace ~/bin')
        ensure_link('.tmux.platform.conf', 'configs/.tmux.mac.conf')
    else:
        ensure_file('.tmux.platform.conf')
    ensure_ruby_pkg('tmuxinator')
コード例 #4
0
ファイル: fabfile.py プロジェクト: yejianye/tools-config
def ctags():
    if is_macos():
        ensure_package('ctags', '--HEAD')  # Ensure to get Ctags trunk for Objective-C support
    else:
        ensure_package('ctags')
    ensure_link('.ctags', 'configs/.ctags')