Bootstap script.
This commit is contained in:
parent
580145edbc
commit
404d8fb60d
@ -11,7 +11,7 @@ INSTALLER_DIR=`mktemp -d`
|
|||||||
#
|
#
|
||||||
# @param $1 URL
|
# @param $1 URL
|
||||||
# @param $2 File name
|
# @param $2 File name
|
||||||
function download_installer {
|
function download_installer {`
|
||||||
echo "Downloading $1/$2..."
|
echo "Downloading $1/$2..."
|
||||||
cd "$INSTALLER_DIR"
|
cd "$INSTALLER_DIR"
|
||||||
curl -LO "$1/$2"
|
curl -LO "$1/$2"
|
||||||
@ -24,9 +24,7 @@ function download_installer {
|
|||||||
# @param Application name
|
# @param Application name
|
||||||
function install_app {
|
function install_app {
|
||||||
echo "Installing $2.app..."
|
echo "Installing $2.app..."
|
||||||
cp -a "$1/$2.app" "$HOME/Applications/"
|
cp -a "$1/$2.app" "/Applications/"
|
||||||
#find "$1" -type d -name "*.app" -exec sh -c 'cp -a "$0" $HOME/Applications/' {} ';'
|
|
||||||
#find "$1" -type d -name "*.app" -exec sh -c 'cp -a "$0" $HOME/Applications/' {} ';'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Installs an application via a DMG file
|
# Installs an application via a DMG file
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Installs Chrome and makes it default browser
|
||||||
|
|
||||||
|
|
||||||
source "$HOME/dotfiles/includes/installer.sh"
|
source "$HOME/dotfiles/includes/installer.sh"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Installs Bash 4 and registers it as a default shell
|
# Installs Bash 4 and registers it as a default shell
|
||||||
|
|
||||||
|
|
||||||
brew install bash
|
brew install bash
|
||||||
grep '/usr/local/bin/bash' /etc/shells >/dev/null 2>&1 && sudo bash -c "echo /usr/local/bin/bash >> /etc/shells"
|
grep '/usr/local/bin/bash' /etc/shells >/dev/null 2>&1 && sudo bash -c "echo /usr/local/bin/bash >> /etc/shells"
|
||||||
chsh -s /usr/local/bin/bash $USER
|
chsh -s /usr/local/bin/bash $USER
|
13
setup/bootstrap.sh
Executable file
13
setup/bootstrap.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# New Mac bootstrap
|
||||||
|
|
||||||
|
. brew.sh
|
||||||
|
. npm.sh
|
||||||
|
. bash.sh
|
||||||
|
. consolas.sh
|
||||||
|
. imgo.sh
|
||||||
|
. osx.sh
|
||||||
|
. sublime-settings.sh
|
||||||
|
. sublime-packages.sh
|
||||||
|
. apps.sh
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Based on https://github.com/mathiasbynens/dotfiles/blob/master/.brew
|
|
||||||
|
# Installs Homebrew with some formulaes
|
||||||
|
|
||||||
|
|
||||||
# Setup Homebrew
|
# Setup Homebrew
|
||||||
command -v brew >/dev/null 2>&1 || ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
|
command -v brew >/dev/null 2>&1 || ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
|
||||||
@ -15,9 +17,6 @@ brew install coreutils
|
|||||||
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
||||||
brew install findutils
|
brew install findutils
|
||||||
|
|
||||||
# Install wget with IRI support
|
|
||||||
#brew install wget --enable-iri
|
|
||||||
|
|
||||||
# Install more recent versions of some OS X tools
|
# Install more recent versions of some OS X tools
|
||||||
brew tap homebrew/dupes
|
brew tap homebrew/dupes
|
||||||
brew install homebrew/dupes/grep
|
brew install homebrew/dupes/grep
|
||||||
@ -28,7 +27,7 @@ brew install homebrew/dupes/grep
|
|||||||
brew install git
|
brew install git
|
||||||
brew install git-extras
|
brew install git-extras
|
||||||
brew install unrar
|
brew install unrar
|
||||||
#brew install node
|
brew install node
|
||||||
|
|
||||||
# Remove outdated versions from the cellar
|
# Remove outdated versions from the cellar
|
||||||
brew cleanup
|
brew cleanup
|
@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Installs Consolas font
|
||||||
|
#
|
||||||
# Press "Intall font" button when font dialog opens
|
# Press "Intall font" button when font dialog opens
|
||||||
# Based on http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
|
# Based on http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
|
||||||
|
|
||||||
|
|
||||||
brew install cabextract
|
brew install cabextract
|
||||||
TMPDIR=`mktemp -d` && {
|
TMPDIR=`mktemp -d` && {
|
||||||
cd $TMPDIR
|
cd $TMPDIR
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Installs imgo CLI image optimizer
|
||||||
# https://github.com/imgo/imgo
|
# https://github.com/imgo/imgo
|
||||||
|
|
||||||
|
|
||||||
brew install exiftool imagemagick optipng libjpeg gifsicle
|
brew install exiftool imagemagick optipng libjpeg gifsicle
|
||||||
|
|
||||||
formulas='pngout.rb defluff.rb cryopng.rb imgo.rb'
|
formulas='pngout.rb defluff.rb cryopng.rb imgo.rb'
|
||||||
|
10
setup/npm.sh
Normal file
10
setup/npm.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Installs Node.js and some NPM packages
|
||||||
|
|
||||||
|
|
||||||
|
brew install node
|
||||||
|
|
||||||
|
npm install -g grunt
|
||||||
|
npm install -g jshint
|
||||||
|
npm install -g bower
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Sane OSX defaults
|
||||||
# ~/.osx — http://mths.be/osx
|
# ~/.osx — http://mths.be/osx
|
||||||
|
|
||||||
COMPUTERNAME='Mac'
|
COMPUTERNAME='Mac'
|
||||||
@ -562,8 +563,7 @@ sudo pmset -c panicrestart 15
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
for app in "Address Book" "Calendar" "Contacts" "Dashboard" "Dock" "Finder" \
|
for app in "Address Book" "Calendar" "Contacts" "Dashboard" "Dock" "Finder" \
|
||||||
"Mail" "Safari" "SizeUp" "SystemUIServer" "Terminal" "Transmission" \
|
"Mail" "Safari" "SystemUIServer" "Terminal" "iCal" "iTunes"; do
|
||||||
"Twitter" "iCal" "iTunes"; do
|
|
||||||
killall "$app" > /dev/null 2>&1
|
killall "$app" > /dev/null 2>&1
|
||||||
done
|
done
|
||||||
echo "Done. Note that some of these changes require a logout/restart to take effect."
|
echo "Done. Note that some of these changes require a logout/restart to take effect."
|
@ -1,32 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Installs/updates Sublime packages
|
# Installs/updates Sublime packages
|
||||||
#
|
#
|
||||||
# 1. Installs Package Control (all plugins listed in `Package Control.sublime-settings` will be installed after Sublime restarts).
|
# 1. Installs Package Control (all plugins listed in `Package Control.sublime-settings` will be installed after Sublime restarts).
|
||||||
# 2. Installs some packages from GitHub.
|
# 2. Installs some packages from GitHub.
|
||||||
|
|
||||||
|
|
||||||
if [ `uname` == 'Darwin' ]; then
|
if [ `uname` == 'Darwin' ]; then
|
||||||
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages
|
DIR=~/Library/Application\ Support/Sublime\ Text\ 2/Packages
|
||||||
else
|
else
|
||||||
cd ~/AppData/Roaming/Sublime\ Text\ 2/Installed\ Packages
|
DIR=~/AppData/Roaming/Sublime\ Text\ 2/Packages
|
||||||
fi
|
fi
|
||||||
|
[ ! -d "$DIR" ] && mkdir -p "$DIR"
|
||||||
|
cd "$DIR"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Package Control
|
# Package Control
|
||||||
#
|
#
|
||||||
|
|
||||||
[ ! -f Package\ Control.sublime-package ] && curl -o Package\ Control.sublime-package http://sublime.wbond.net/Package%20Control.sublime-package
|
[ ! -d Package\ Control ] && [ ! -f Package\ Control.sublime-package ] && curl -o Package\ Control.sublime-package http://sublime.wbond.net/Package%20Control.sublime-package
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# GitHub
|
# GitHub
|
||||||
#
|
#
|
||||||
|
|
||||||
cd ../Packages
|
|
||||||
|
|
||||||
# Hayaku Bundle
|
# Hayaku Bundle
|
||||||
if [ -d ./hayaku ]; then
|
if [ -d ./hayaku ]; then
|
||||||
echo "Updating Hayaku Bundle..."
|
echo "Updating Hayaku Bundle..."
|
||||||
cd hayaku
|
cd "$DIR/hayaku"
|
||||||
git pull
|
git pull
|
||||||
git submodule update
|
git submodule update
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Enables Sublime settings syncronization
|
# Enables Sublime settings syncronization
|
||||||
|
|
||||||
|
|
||||||
if [ `uname` == 'Darwin' ]; then
|
if [ `uname` == 'Darwin' ]; then
|
||||||
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
|
DIR=~/Library/Application\ Support/Sublime\ Text\ 2
|
||||||
else
|
else
|
||||||
cd ~/AppData/Roaming/Sublime\ Text\ 2/Packages
|
DIR=~/AppData/Roaming/Sublime\ Text\ 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -d ../Packages.bak ] && mkdir ../Packages.bak
|
[ ! -d "$DIR" ] && mkdir -p "$DIR/Packages"
|
||||||
mv User ../Packages.bak/User
|
if [ -d "$DIR/Packages/User" ]; then
|
||||||
ln -s ~/dotfiles/sublime/User User
|
mkdir "$DIR/Packages.bak"
|
||||||
|
mv "$DIR/Packages/User" "$DIR/Packages.bak/User"
|
||||||
|
fi
|
||||||
|
ln -s ~/dotfiles/sublime/User "$DIR/Packages/User"
|
@ -20,6 +20,7 @@
|
|||||||
"save_on_focus_lost": true,
|
"save_on_focus_lost": true,
|
||||||
"tab_completion": true,
|
"tab_completion": true,
|
||||||
"detect_slow_plugins": false,
|
"detect_slow_plugins": false,
|
||||||
|
"scroll_past_end": true,
|
||||||
"theme": "Soda Light.sublime-theme",
|
"theme": "Soda Light.sublime-theme",
|
||||||
|
|
||||||
// Hayaku
|
// Hayaku
|
||||||
|
Loading…
Reference in New Issue
Block a user