Skip to content

Commit

Permalink
remove BrewFile and CaskFile per Homebrew/legacy-homebrew#30815
Browse files Browse the repository at this point in the history
  • Loading branch information
atomantic committed Aug 13, 2014
1 parent 1a9a8a6 commit 74f1797
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 138 deletions.
1 change: 1 addition & 0 deletions .vim/autoload/autoload
1 change: 1 addition & 0 deletions .vim/bundle/bundle
1 change: 1 addition & 0 deletions .vim/colors/colors
54 changes: 0 additions & 54 deletions BrewFile

This file was deleted.

48 changes: 0 additions & 48 deletions CaskFile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git clone --recurse-submodules https://github.com/atomantic/dotfiles ~/.dotfiles
- Change your user account system shell to zsh
- Run the install script
```bash
./install.zsh
./install.sh
```

## Additional
Expand Down
35 changes: 17 additions & 18 deletions install.zsh → install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/zsh
#!/usr/bin/env bash

###########################
# This script installs the dotfiles and runs all other system configuration scripts
Expand All @@ -9,44 +9,44 @@
# include my library helpers for colorized echo and require_brew, etc
source ./lib.sh

export UNLINK=true
export UNLINK=false
bot "Hi. I'm going to make your OSX system better."

read \?"\[._.]/ - Hi. I'm going to make your OSX system better. OK?"
# read -r -p "OK? [Y/n] " response
# if [[ ! $response =~ ^(yes|y|Y| ) ]];then
# exit 1
# fi

action "Installing OSX settings, software and dotfiles symlinks..."
# bot "awesome. let's roll..."

#export DOTFILESDIRRELATIVETOHOME=$PWD
export DOTFILESDIRRELATIVETOHOME=.dotfiles
echo "DOTFILESDIRRELATIVETOHOME = $DOTFILESDIRRELATIVETOHOME"
pushd ~
pushd ~ > /dev/null

action "formatting configs for "$(whoami)
action "formatting configs for "$(whoami)"..."

sed -i '' 's/eivya001/'$(whoami)'/g' .zshrc;

function symlinkifne {
action "WORKING ON: $1..."
echo -ne "linking $1..."

# does it exist
if [[ -a $1 ]]; then
warn " $1 already exists."
if [[ -a $1 || -L $1 ]]; then

# If Unlink is requested
if [ "$UNLINK" = "true" ]; then
action " Unlinking $1..."
unlink $1

# create the link
action " Symlinking $DOTFILESDIRRELATIVETOHOME/$1 to $1"
ln -s $DOTFILESDIRRELATIVETOHOME/$1 $1
ok
else
ok " SKIPPING $1."
ok
fi
# does not exist
else
# create the link
action " Symlinking $DOTFILESDIRRELATIVETOHOME/$1 to $1"
ln -s $DOTFILESDIRRELATIVETOHOME/$1 $1
ok
fi
}

Expand Down Expand Up @@ -81,7 +81,6 @@ symlinkifne .zshrc

popd

action "running OSX config and Brew installations"
./osx.sh

./.osx
ok "\[._.]/ - woot! All done."
bot "Woot! All done."
20 changes: 13 additions & 7 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ function ok() {
echo -e "$COL_GREEN[ok]$COL_RESET "$1
}

function bot() {
echo -e "$COL_GREEN\[._.]/$COL_RESET - "$1
}

function running() {
echo -en $1"..."
}

function action() {
echo -e "$COL_YELLOW[action]$COL_RESET "$1
}
Expand All @@ -32,32 +40,30 @@ function error() {
}

function require_cask() {
echo "checking brew cask $1..."
running "installing brew cask $1..."
brew cask list $1 > /dev/null 2>&1 | true
if [[ ${PIPESTATUS[0]} != 0 ]]; then
action "installing $1..."
brew cask install $1
if [[ $? != 0 ]]; then
error "failed to install $1! aborting..."
exit -1
fi
else
ok "$1 is installed"
ok
fi
}

function require_brew() {
echo "checking brew $1..."
running "installing brew $1 $2..."
brew list $1 > /dev/null 2>&1 | true
if [[ ${PIPESTATUS[0]} != 0 ]]; then
action "$1 installing..."
brew install $1
brew install $1 $2
if [[ $? != 0 ]]; then
error "failed to install $1! aborting..."
exit -1
fi
else
ok "$1 is installed"
ok
fi
}

Expand Down
Loading

0 comments on commit 74f1797

Please sign in to comment.