diff --git a/helpers.sh b/helpers.sh index 0353736..64253af 100644 --- a/helpers.sh +++ b/helpers.sh @@ -12,6 +12,17 @@ function print_error() { echo -e "[\\033[32mERROR\\033[0m] $@" } +function caskget() +{ + # Install OSX application using homebrew cask + # if not already installed + local caskname=$(basename $1) + + if ! brew cask list | grep ${caskname} >/dev/null; then + print_info "Installing ${caskname} from cask" + brew cask install "$@" + fi +} function brewget() { # Install software using homebrew @@ -23,17 +34,6 @@ function brewget() brew install "$@" fi } -function caskget() -{ - # Install OSX application using homebrew cask - # if not already installed - local caskname=$(basename $1) - - if ! brew cask list | grep ${caskname} >/dev/null; then - print_info "Installing ${caskname} from cask" - brew cask install "$@" - fi -} function linkfile() { diff --git a/homebrew/setup.sh b/homebrew/setup.sh new file mode 100755 index 0000000..b981db3 --- /dev/null +++ b/homebrew/setup.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +source ${DOTFILES}/helpers.sh + +function main() +{ + print_info "Setting up homebrew and brewing misc stuff" + + if ! which brew>/dev/null; then + echo "Installing Homebrew" + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + fi + + if ! brew tap | grep caskroom/cask >/dev/null; then + echo "Installing caskroom tap" + brew tap caskroom/cask + fi + + + caskget google-chrome + caskget docker + caskget caskroom/drivers/logitech-options + + brewget arp-scan + brewget neovim + + print_ok "Homebrew and misc. brews insalled" +} + +main "$@" diff --git a/install.sh b/install.sh index 5a080cd..0fc3b81 100755 --- a/install.sh +++ b/install.sh @@ -1,50 +1,11 @@ #!/usr/bin/env bash -function install_homebrew() -{ - - if ! which brew>/dev/null; then - echo "Installing Homebrew" - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - fi - - if ! brew tap | grep caskroom/cask ; then - echo "Installing caskroom tap" - brew tap caskroom/cask - fi - -} - - -function install_casks() -{ - brew cask install google-chrome - brew cask install docker - brew cask install caskroom/drivers/logitech-options -} - -function install_brews() -{ - #/usr/local/bin/brew update - brew install tmux - brew install arp-scan - brew install neovim -} - - -function setup_kitty() -{ - # Copy kitty.app to /Applications - #cp ${KITTY_PATH} /Applications/. - ln -s ${DOTFILES}/kitty.conf ${HOME}/Library/Preferences/kitty/kitty.conf -} - - -DOTFILES=/Users/thomas/dotfiles DOTFILES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" +${DOTFILES}/homebrew/setup.sh ${DOTFILES}/ssh/setup.sh ${DOTFILES}/git/setup.sh ${DOTFILES}/NAS_mounts/setup.sh +${DOTFILES}/terminal/setup.sh ${DOTFILES}/fish/setup.sh ${DOTFILES}/wm/setup.sh diff --git a/kitty.conf b/terminal/kitty.conf similarity index 100% rename from kitty.conf rename to terminal/kitty.conf diff --git a/terminal/setup.sh b/terminal/setup.sh new file mode 100755 index 0000000..2ca07d9 --- /dev/null +++ b/terminal/setup.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +source ${DOTFILES}/helpers.sh + +function main() +{ + print_info "Installing kitty terminal" + + # Copy kitty.app to /Applications + # cp ${KITTY_PATH} /Applications/. + + # Install configuration file + linkfile ${DOTFILES}/terminal/kitty.conf ${HOME}/Library/Preferences/kitty/kitty.conf + + print_ok "Kitty terminal installed" + + print_info "Installing terminal applications" + + brewget tmux + + print_ok "Terminal applications installed" +} + +main "$@"