All cleaned up

This commit is contained in:
Thomas Lovén 2017-10-15 14:44:53 +02:00
parent 64f51a60eb
commit 35f36a4300
5 changed files with 67 additions and 52 deletions

View File

@ -12,6 +12,17 @@ function print_error() {
echo -e "[\\033[32mERROR\\033[0m] $@" 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() function brewget()
{ {
# Install software using homebrew # Install software using homebrew
@ -23,17 +34,6 @@ function brewget()
brew install "$@" brew install "$@"
fi 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() function linkfile()
{ {

30
homebrew/setup.sh Executable file
View File

@ -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 "$@"

View File

@ -1,50 +1,11 @@
#!/usr/bin/env bash #!/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="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
${DOTFILES}/homebrew/setup.sh
${DOTFILES}/ssh/setup.sh ${DOTFILES}/ssh/setup.sh
${DOTFILES}/git/setup.sh ${DOTFILES}/git/setup.sh
${DOTFILES}/NAS_mounts/setup.sh ${DOTFILES}/NAS_mounts/setup.sh
${DOTFILES}/terminal/setup.sh
${DOTFILES}/fish/setup.sh ${DOTFILES}/fish/setup.sh
${DOTFILES}/wm/setup.sh ${DOTFILES}/wm/setup.sh

24
terminal/setup.sh Executable file
View File

@ -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 "$@"