#!/bin/bash

function install {
  which $1 &> /dev/null

  if [ $? -ne 0 ]; then
    echo "Installing: ${1}..."
    if [ -z ${2} ]
    then
      brew install ${1}
    else
      brew install --cask ${1}
    fi
  else
    echo "Already installed: ${1}"
  fi
}


brew update

install "gimp" "cask"
install "thunderbird" "cask"
install "firefox" "cask"
install "zotero" "cask"
install "rectangle" "cask"
install "vlc" "cask"
install "iterm2" "cask"
install "inkscape" "cask"
install "obsidian" "cask"
install "blender" "cask"
install "mactex" "cask"
install "bitwarden" "cask"
install "visual-studio-code" "cask"
install "spotify" "cask"
install "freeplane" "cask"
install "joplin" "cask"

install "neovim"
install "tmux"
install "docker"
install "docker-compose"
install "git"
install "curl"
install "zsh"
install "stow"
install "tree"
install "node"
install "universal-ctags"
