1
0
mirror of https://github.com/danbee/mac-setup synced 2025-03-04 08:39:10 +00:00

Compare commits

..

No commits in common. "52ed8fe591efa3ef7737876554f9ed8b6b7e714d" and "30be66abd7e1cbec1f94e66403a6803a9492651d" have entirely different histories.

8 changed files with 53 additions and 99 deletions

View File

@ -1,11 +1,10 @@
tap "thoughtbot/formulae"
tap "heroku/brew"
brew "asdf"
brew "direnv"
brew "git"
brew "heroku"
brew "imagemagick"
brew "mas"
brew "mackup"
brew "postgresql"
brew "pv"
brew "ripgrep"
@ -21,16 +20,30 @@ brew "zsh"
cask "1password"
cask "acorn"
cask "choosy"
cask "colorpicker-skalacolor"
cask "dropbox"
cask "fantastical"
cask "firefox"
cask "google-chrome"
cask "imagealpha"
cask "imageoptim"
cask "iterm2-nightly"
cask "istat-menus"
cask "iterm2"
cask "ivolume"
cask "kaleidoscope"
cask "macvim"
cask "mplayerx"
cask "mpv"
cask "phantomjs"
cask "sequel-pro"
cask "skype"
cask "spotify"
cask "superduper"
cask "textmate"
cask "vmware-fusion"
cask "vlc"
tap "caskroom/fonts"
cask "font-vollkorn"
cask "font-source-code-pro"
cask "font-source-sans-pro"

View File

@ -1,11 +1,11 @@
## Mac Setup
Script and Brewfile to setup a Mac for development.
Script and Brewfiles to setup a Mac for development.
## Instructions
1. Run the setup script with:
Full Xcode install is required to compile MacVim.
```sh
curl -s https://raw.githubusercontent.com/danbee/mac-setup/master/setup.sh | sh`
```
1. Install Xcode with `xcode-select --install`. Select "Get Xcode".
2. Run the setup script with `curl -s https://raw.githubusercontent.com/danbee/mac-setup/master/setup.sh | sh`

View File

@ -1,24 +0,0 @@
#!/bin/sh
cd "$HOME"
if [ $SHELL != $(which zsh) ]; then
chsh -s $(which zsh)
fi
if [ ! -d "$HOME/dotfiles" ]; then
git clone git@github.com:thoughtbot/dotfiles.git
else
cd "$HOME/dotfiles"
git pull
cd -
fi
if [ ! -d "$HOME/dotfiles-local" ]; then
git clone git@github.com:danbee/dotfiles-local.git
else
cd "$HOME/dotfiles-local"
git pull
cd -
fi
env RCRC="$HOME/dotfiles/rcrc" rcup

View File

@ -1,8 +0,0 @@
#!/bin/sh
DOTFILES="$HOME/dotfiles-local"
if [ ! -f "$DOTFILES/gitconfig.author" ]; then
cp "$DOTFILES//gitconfig.author.example" "$DOTFILES/gitconfig.author"
vim "$DOTFILES/gitconfig.author"
fi

View File

@ -1 +0,0 @@
#!/bin/sh

View File

@ -1,9 +0,0 @@
#!/bin/sh
# mas install 13764025890
mas install 1107421413
mas install 403504866
mas install 1278508951
mas install 497799835
mas install 1179623856
mas install 1082624744

19
mas.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
mas install 904280696
mas install 13764025890
mas install 1084713122
mas install 1107421413
mas install 409183694
mas install 403504866
mas install 1278508951
mas install 918858936
mas install 530458789
mas install 734335183
mas install 409203825
mas install 497799835
mas install 409201541
mas install 1179623856
mas install 1082624744
mas install 1225570693
mas install 924726344

View File

@ -1,59 +1,23 @@
#!/bin/sh
MAC_SETUP_DIR="$HOME/mac-setup"
BOLD="\033[1m"
WHITE="\033[0;37m"
YELLOW="\033[1;33m"
GREEN="\033[1;32m"
NC="\033[0m"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
step() {
echo "${YELLOW} ${WHITE}${BOLD}$1${NC} ${YELLOW}${NC}"
}
# We want to be in the user home directory.
cd ~
# Generate an SSH key if one does not already exist
if [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then
step "Generating SSH key"
ssh-keygen -t ed25519 -f "$HOME/.ssh/id_ed25519"
echo "Copy and paste the public portion of the key (below) to GitHub"
echo "============ Public key ============="
cat ~/.ssh/id_ed25519.pub
echo "====================================="
read -r -p "Press any key to continue... " -n 1
fi
# Install Homebrew
step "Installing Homebrew"
if ! type brew > /dev/null; then
/usr/bin/ruby -e \
"$(curl \
-fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Clone setup repo
if [ ! -d "$MAC_SETUP_DIR" ]; then
git clone git@github.com:danbee/mac-setup.git "$HOME/mac-setup"
else
cd "$MAC_SETUP_DIR"
git pull
cd -
fi
# Get Brewfiles.
echo 'Downloading...'
curl -s https://raw.githubusercontent.com/danbee/mac-setup/master/Brewfile > ~/Brewfile
curl -s https://raw.githubusercontent.com/danbee/mac-setup/master/mas.sh > ~/mas.sh
chmod +x ~/mas.sh
# Install brew bundles
step "Installing Homebrew bundle"
brew bundle --file="$MAC_SETUP_DIR/Brewfile"
echo 'Installing Homebrew bundle...'
brew bundle
# Install Mac App Store apps
step "Installing App Store apps"
"$MAC_SETUP_DIR/lib/mas.sh"
echo 'Installing App Store apps'
~/mas.sh
# Install dotfiles
step "Installing dotfiles"
"$MAC_SETUP_DIR/lib/dotfiles.sh"
echo 'Done!'
# Setup git author
step "Set git author"
"$MAC_SETUP_DIR/lib/git_author.sh"
echo "${GREEN}${WHITE}${BOLD}Done!${NC} 🎉"