forked from colonelpanic/dotfiles
[macOS] Use Brewfiles
This commit is contained in:
parent
14b484b2ab
commit
b392fd30a3
@ -21,7 +21,6 @@ pylint
|
|||||||
pyspotify
|
pyspotify
|
||||||
pythonpy
|
pythonpy
|
||||||
readline
|
readline
|
||||||
ropemacs
|
|
||||||
simplejson
|
simplejson
|
||||||
sphinx
|
sphinx
|
||||||
sqlalchemy
|
sqlalchemy
|
||||||
|
15
start.sh
Normal file → Executable file
15
start.sh
Normal file → Executable file
@ -1,15 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
function fedora() {
|
|
||||||
yum install make automake gcc gcc-c++ kernel-devel
|
|
||||||
yum install
|
|
||||||
yum install python-pip
|
|
||||||
}
|
|
||||||
|
|
||||||
function debian() {
|
|
||||||
local INSTALL_COMMAND='sudo apt-get -y install'
|
|
||||||
hash apt-get &>/dev/null || (echo 'apt-get is missing.' && exit)
|
|
||||||
$INSTALL_COMMAND build-essential git python python-dev python-pip
|
|
||||||
}
|
|
||||||
|
|
||||||
function brew_for_multiple_users() {
|
function brew_for_multiple_users() {
|
||||||
sudo chgrp -R admin /usr/local
|
sudo chgrp -R admin /usr/local
|
||||||
@ -27,13 +17,12 @@ function osx() {
|
|||||||
brew install git
|
brew install git
|
||||||
brew install python
|
brew install python
|
||||||
sudo easy_install pip
|
sudo easy_install pip
|
||||||
sudo pip install cider
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function go() {
|
function go() {
|
||||||
git clone https://github.com/IvanMalison/dotfiles.git --recursive
|
git clone https://github.com/IvanMalison/dotfiles.git --recursive
|
||||||
cd dotfiles
|
cd dotfiles
|
||||||
sudo pip install invoke dotfiles
|
sudo pip install invoke
|
||||||
invoke setup
|
invoke setup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,14 +19,13 @@ ns.add_collection(arch)
|
|||||||
def setup(ctx):
|
def setup(ctx):
|
||||||
ctx.config['run']['pty'] = False
|
ctx.config['run']['pty'] = False
|
||||||
ctx.config['run']['warn'] = True
|
ctx.config['run']['warn'] = True
|
||||||
dotfiles(ctx, 'f')
|
|
||||||
if 'darwin' in sys.platform:
|
if 'darwin' in sys.platform:
|
||||||
osx.setup(ctx)
|
osx.setup(ctx)
|
||||||
else:
|
else:
|
||||||
linux.setup(ctx)
|
linux.setup(ctx)
|
||||||
fix_pip(ctx)
|
dotfiles(ctx)
|
||||||
python(ctx)
|
python(ctx)
|
||||||
powerline(ctx)
|
fix_pip(ctx)
|
||||||
install_npm_libraries(ctx)
|
install_npm_libraries(ctx)
|
||||||
change_shell(ctx)
|
change_shell(ctx)
|
||||||
|
|
||||||
@ -56,16 +55,12 @@ def link_emacs(ctx, flags='f'):
|
|||||||
force=True)
|
force=True)
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
|
||||||
def powerline(ctx):
|
|
||||||
ctx.run('sudo pip install psutil')
|
|
||||||
ctx.run('sudo pip install git+git://github.com/Lokaltog/powerline')
|
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def python(ctx):
|
def python(ctx):
|
||||||
ctx.run('sudo pip install setuptools --upgrade')
|
ctx.run('pyenv install 2.7.11')
|
||||||
ctx.run('sudo pip install -r {0}'.format(
|
ctx.run('pyenv global 2.7.11')
|
||||||
|
ctx.run('pip install setuptools --upgrade')
|
||||||
|
ctx.run('pip install -r {0}'.format(
|
||||||
os.path.join(RESOURCES_DIRECTORY, 'requirements.txt')
|
os.path.join(RESOURCES_DIRECTORY, 'requirements.txt')
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -77,10 +72,6 @@ def install_npm_libraries(ctx):
|
|||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
|
||||||
def vimstall(ctx):
|
|
||||||
ctx.run('vim +BundleInstall! +q +q')
|
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def change_shell(ctx):
|
def change_shell(ctx):
|
||||||
@ -139,8 +130,6 @@ ns.add_task(dropbox_dotfiles)
|
|||||||
ns.add_task(install_npm_libraries)
|
ns.add_task(install_npm_libraries)
|
||||||
ns.add_task(python)
|
ns.add_task(python)
|
||||||
ns.add_task(link_dropbox_other)
|
ns.add_task(link_dropbox_other)
|
||||||
ns.add_task(powerline)
|
|
||||||
ns.add_task(setup)
|
ns.add_task(setup)
|
||||||
ns.add_task(vimstall)
|
|
||||||
ns.add_task(fix_dropbox_permissions)
|
ns.add_task(fix_dropbox_permissions)
|
||||||
ns.add_task(link_emacs)
|
ns.add_task(link_emacs)
|
||||||
|
114
tasks/brewfiles/additional
Normal file
114
tasks/brewfiles/additional
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
brew 'android-sdk'
|
||||||
|
brew 'ant'
|
||||||
|
brew 'autoconf'
|
||||||
|
brew 'autojump'
|
||||||
|
brew 'automake'
|
||||||
|
brew 'binutils'
|
||||||
|
brew 'brew-cask'
|
||||||
|
brew 'cmake'
|
||||||
|
brew 'coreutils'
|
||||||
|
brew 'ctags'
|
||||||
|
brew 'daemonize'
|
||||||
|
brew 'docker'
|
||||||
|
brew 'fontconfig'
|
||||||
|
brew 'fontforge'
|
||||||
|
brew 'freetype'
|
||||||
|
brew 'gawk'
|
||||||
|
brew 'gcc'
|
||||||
|
brew 'gdbm'
|
||||||
|
brew 'gettext'
|
||||||
|
brew 'git-flow'
|
||||||
|
brew 'git-subrepo'
|
||||||
|
brew 'giter8'
|
||||||
|
brew 'glib'
|
||||||
|
brew 'gobject-introspection'
|
||||||
|
brew 'gradle'
|
||||||
|
brew 'grsync'
|
||||||
|
brew 'gtk+3'
|
||||||
|
brew 'gupnp'
|
||||||
|
brew 'html2text'
|
||||||
|
brew 'icu4c'
|
||||||
|
brew 'intltool'
|
||||||
|
brew 'isync'
|
||||||
|
brew 'jpeg'
|
||||||
|
brew 'leiningen'
|
||||||
|
brew 'libevent'
|
||||||
|
brew 'libffi'
|
||||||
|
brew 'libidn'
|
||||||
|
brew 'libpng'
|
||||||
|
brew 'libsoup'
|
||||||
|
brew 'libspotify'
|
||||||
|
brew 'libtasn1'
|
||||||
|
brew 'libtiff'
|
||||||
|
brew 'libtool'
|
||||||
|
brew 'lzip'
|
||||||
|
brew 'mackup'
|
||||||
|
brew 'mercurial'
|
||||||
|
brew 'mopidy'
|
||||||
|
brew 'mu --with-emacs'
|
||||||
|
brew 'mysql'
|
||||||
|
brew 'ncmpcpp'
|
||||||
|
brew 'netcat'
|
||||||
|
brew 'nettle'
|
||||||
|
brew 'ngrep'
|
||||||
|
brew 'nmap'
|
||||||
|
brew 'offline-imap'
|
||||||
|
brew 'openssl'
|
||||||
|
brew 'ossp-uuid'
|
||||||
|
brew 'pandoc'
|
||||||
|
brew 'pango'
|
||||||
|
brew 'pcre'
|
||||||
|
brew 'pixman'
|
||||||
|
brew 'pkg-config'
|
||||||
|
brew 'plantuml'
|
||||||
|
brew 'pstree'
|
||||||
|
brew 'psutils'
|
||||||
|
brew 'pv'
|
||||||
|
brew 'pyenv'
|
||||||
|
brew 'pypy'
|
||||||
|
brew 'python'
|
||||||
|
brew 'python3'
|
||||||
|
brew 'rabbitmq'
|
||||||
|
brew 'racket'
|
||||||
|
brew 'rsync'
|
||||||
|
brew 'rtorrent'
|
||||||
|
brew 'ruby-build'
|
||||||
|
brew 'sdl'
|
||||||
|
brew 'sdl_image'
|
||||||
|
brew 'sdl_mixer'
|
||||||
|
brew 'sdl_ttf'
|
||||||
|
brew 'sleuthkit'
|
||||||
|
brew 'subversion'
|
||||||
|
brew 'tccutil'
|
||||||
|
brew 'terminal-notifier'
|
||||||
|
brew 'the_silver_searcher'
|
||||||
|
brew 'thrift'
|
||||||
|
brew 'tig'
|
||||||
|
brew 'tig'
|
||||||
|
brew 'tmate'
|
||||||
|
brew 'tmux'
|
||||||
|
brew 'unoconv'
|
||||||
|
brew 'vim'
|
||||||
|
brew 'w3m'
|
||||||
|
brew 'wakeonlan'
|
||||||
|
brew 'wdiff'
|
||||||
|
brew 'webp'
|
||||||
|
brew 'weechat'
|
||||||
|
brew 'wget'
|
||||||
|
brew 'whereami'
|
||||||
|
brew 'xz'
|
||||||
|
brew 'yab'
|
||||||
|
cask 'adobe-reader'
|
||||||
|
cask 'android-studio'
|
||||||
|
cask 'atom'
|
||||||
|
cask 'bittorrent-sync'
|
||||||
|
cask 'calibre'
|
||||||
|
cask 'chicken'
|
||||||
|
cask 'cscreen'
|
||||||
|
cask 'firefox'
|
||||||
|
cask 'flux'
|
||||||
|
cask 'hipchat'
|
||||||
|
cask 'libreoffice'
|
||||||
|
cask 'owncloud'
|
||||||
|
cask 'sublime-text'
|
||||||
|
cask 'virtualbox'
|
69
tasks/brewfiles/default
Normal file
69
tasks/brewfiles/default
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
cask_args appdir: '/Applications'
|
||||||
|
|
||||||
|
brew 'ack'
|
||||||
|
brew 'bash'
|
||||||
|
brew 'boot-clj'
|
||||||
|
brew 'cabal-install'
|
||||||
|
brew 'coreutils'
|
||||||
|
brew 'emacs', args: ['with-cocoa', 'with-librsvg', 'with-gnutls', 'with-imagemagick']
|
||||||
|
brew 'findutils'
|
||||||
|
brew 'ghc'
|
||||||
|
brew 'gist'
|
||||||
|
brew 'git'
|
||||||
|
brew 'git-flow'
|
||||||
|
brew 'glide'
|
||||||
|
brew 'gnupg'
|
||||||
|
brew 'gnupg2'
|
||||||
|
brew 'gnutls'
|
||||||
|
brew 'go'
|
||||||
|
brew 'htop-osx'
|
||||||
|
brew 'hub'
|
||||||
|
brew 'icdiff'
|
||||||
|
brew 'ispell'
|
||||||
|
brew 'leiningen'
|
||||||
|
brew 'netcat'
|
||||||
|
brew 'nettle'
|
||||||
|
brew 'ngrep'
|
||||||
|
brew 'nmap'
|
||||||
|
brew 'node'
|
||||||
|
brew 'openssl'
|
||||||
|
brew 'pyenv'
|
||||||
|
brew 'pyenv'
|
||||||
|
brew 'pypy'
|
||||||
|
brew 'python'
|
||||||
|
brew 'python3'
|
||||||
|
brew 'rbenv'
|
||||||
|
brew 'readline'
|
||||||
|
brew 'reattach-to-user-namespace'
|
||||||
|
brew 'rust'
|
||||||
|
brew 'sbt'
|
||||||
|
brew 'scala'
|
||||||
|
brew 'sqlite'
|
||||||
|
brew 'the_silver_searcher'
|
||||||
|
brew 'thrift'
|
||||||
|
brew 'tmate'
|
||||||
|
brew 'tmux'
|
||||||
|
brew 'watch'
|
||||||
|
brew 'zsh'
|
||||||
|
|
||||||
|
cask 'alfred'
|
||||||
|
cask 'caffeine'
|
||||||
|
cask 'dropbox'
|
||||||
|
cask 'flash'
|
||||||
|
cask 'flycut'
|
||||||
|
cask 'google-chrome'
|
||||||
|
cask 'google-hangouts'
|
||||||
|
cask 'gpgtools'
|
||||||
|
cask 'iterm2'
|
||||||
|
cask 'java'
|
||||||
|
cask 'karabiner'
|
||||||
|
cask 'macpass'
|
||||||
|
cask 'mirrordisplays'
|
||||||
|
cask 'osxfuse'
|
||||||
|
cask 'slate'
|
||||||
|
cask 'sparkleshare'
|
||||||
|
cask 'spotify'
|
||||||
|
cask 'synergy'
|
||||||
|
cask 'transmission'
|
||||||
|
cask 'vlc'
|
||||||
|
cask 'xquartz'
|
36
tasks/brewfiles/essential
Normal file
36
tasks/brewfiles/essential
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
tap 'thoughtbot/formulae'
|
||||||
|
|
||||||
|
brew 'coreutils'
|
||||||
|
brew 'emacs', args: ['with-cocoa', 'with-librsvg', 'with-gnutls', 'with-imagemagick']
|
||||||
|
brew 'findutils'
|
||||||
|
brew 'git'
|
||||||
|
brew 'gnupg'
|
||||||
|
brew 'gnupg2'
|
||||||
|
brew 'gnutls'
|
||||||
|
brew 'go'
|
||||||
|
brew 'htop-osx'
|
||||||
|
brew 'leiningen'
|
||||||
|
brew 'pyenv'
|
||||||
|
brew 'rcm'
|
||||||
|
brew 'rbenv'
|
||||||
|
brew 'readline'
|
||||||
|
brew 'reattach-to-user-namespace'
|
||||||
|
brew 'the_silver_searcher'
|
||||||
|
brew 'tmux'
|
||||||
|
brew 'zsh'
|
||||||
|
|
||||||
|
cask 'alfred'
|
||||||
|
cask 'flash'
|
||||||
|
cask 'flycut'
|
||||||
|
cask 'google-chrome'
|
||||||
|
cask 'google-hangouts'
|
||||||
|
cask 'iterm2'
|
||||||
|
cask 'java'
|
||||||
|
cask 'karabiner'
|
||||||
|
cask 'slate'
|
||||||
|
cask 'sparkleshare'
|
||||||
|
cask 'spotify'
|
||||||
|
cask 'synergy'
|
||||||
|
cask 'transmission'
|
||||||
|
cask 'vlc'
|
||||||
|
cask 'xquartz'
|
32
tasks/osx.py
32
tasks/osx.py
@ -8,7 +8,7 @@ from . import util
|
|||||||
@ctask(default=True)
|
@ctask(default=True)
|
||||||
def setup(ctx):
|
def setup(ctx):
|
||||||
brew(ctx)
|
brew(ctx)
|
||||||
cider(ctx)
|
brew_essential(ctx)
|
||||||
access_for_assistive_devices(ctx)
|
access_for_assistive_devices(ctx)
|
||||||
tccutil(ctx)
|
tccutil(ctx)
|
||||||
karabiner(ctx)
|
karabiner(ctx)
|
||||||
@ -20,18 +20,10 @@ def setup(ctx):
|
|||||||
iTerm(ctx)
|
iTerm(ctx)
|
||||||
keyboard_settings(ctx)
|
keyboard_settings(ctx)
|
||||||
custom_keyboard_shortcuts(ctx)
|
custom_keyboard_shortcuts(ctx)
|
||||||
|
brew_additional(ctx)
|
||||||
|
brew_default(ctx)
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
|
||||||
def macvim(ctx):
|
|
||||||
macvim_install = (
|
|
||||||
"macvim --override-system-vim --custom-system-icons "
|
|
||||||
"--with-features=huge --enable-rubyinterp --enable-pythoninterp "
|
|
||||||
"--enable-perlinterp --enable-cscope"
|
|
||||||
)
|
|
||||||
ctx.run("brew install {0}".format(macvim_install))
|
|
||||||
ctx.run("vim +BundleInstall! +q +q")
|
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def setup_dbus(ctx):
|
def setup_dbus(ctx):
|
||||||
@ -45,6 +37,23 @@ def system_settings(ctx):
|
|||||||
), pty=True)
|
), pty=True)
|
||||||
|
|
||||||
|
|
||||||
|
BREWFILE_DIRECTORY = os.path.join(util.TASKS_DIRECTORY, "brewfiles")
|
||||||
|
|
||||||
|
|
||||||
|
def make_brewfile_task(filename):
|
||||||
|
task_name = "brew_{}".format(filename)
|
||||||
|
@ctask(name=task_name)
|
||||||
|
def temp(ctx):
|
||||||
|
ctx.run('brew bundle --file="{}"'.format(
|
||||||
|
os.path.join(BREWFILE_DIRECTORY, filename)
|
||||||
|
))
|
||||||
|
globals()[task_name] = temp
|
||||||
|
|
||||||
|
|
||||||
|
for filename in os.listdir(BREWFILE_DIRECTORY):
|
||||||
|
make_brewfile_task(filename)
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
def cider(ctx):
|
def cider(ctx):
|
||||||
ctx.run('brew install caskroom/cask/brew-cask')
|
ctx.run('brew install caskroom/cask/brew-cask')
|
||||||
@ -58,6 +67,7 @@ def brew(ctx):
|
|||||||
path = 'https://raw.githubusercontent.com/Homebrew/install/master/install)'
|
path = 'https://raw.githubusercontent.com/Homebrew/install/master/install)'
|
||||||
if not util.command_exists('brew'):
|
if not util.command_exists('brew'):
|
||||||
ctx.run('ruby -e "$(curl -fsSL {0}'.format(path))
|
ctx.run('ruby -e "$(curl -fsSL {0}'.format(path))
|
||||||
|
ctx.run('brew tap Homebrew/bundle')
|
||||||
|
|
||||||
|
|
||||||
@ctask
|
@ctask
|
||||||
|
@ -4,7 +4,8 @@ import os
|
|||||||
from invoke import run
|
from invoke import run
|
||||||
|
|
||||||
|
|
||||||
REPO_DIRECTORY = os.path.dirname(os.path.dirname(__file__))
|
TASKS_DIRECTORY = os.path.dirname(__file__)
|
||||||
|
REPO_DIRECTORY = os.path.dirname(TASKS_DIRECTORY)
|
||||||
DOTFILES_DIRECTORY = os.path.join(REPO_DIRECTORY, 'dotfiles')
|
DOTFILES_DIRECTORY = os.path.join(REPO_DIRECTORY, 'dotfiles')
|
||||||
RESOURCES_DIRECTORY = os.path.join(REPO_DIRECTORY, 'resources')
|
RESOURCES_DIRECTORY = os.path.join(REPO_DIRECTORY, 'resources')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user