#!/bin/bash set -euo pipefail if [[ "$OSTYPE" == "linux"* ]]; then sudo apt update && sudo apt install -y git elif [[ "$OSTYPE" == "darwin"* ]]; then xcode-select -p &>/dev/null || xcode-select --install fi if [ ! -d .DOTFILES ]; then git clone https://github.com/nickmahdavi/.DOTFILES.git cd .DOTFILES bash bin/install fi cd ~ zsh_path="$(command -v zsh)" if [[ -n "$zsh_path" ]]; then grep -qxF "$zsh_path" /etc/shells || echo "$zsh_path" | sudo tee -a /etc/shells sudo chsh -s "$zsh_path" "$(whoami)" # exec zsh -l < /dev/tty > /dev/tty 2>/dev/tty fi set +u source ~/.vars set -u [ -d setups ] || git clone git@github.com:nickmahdavi/setups.git [ -d functional-welfare ] || git clone git@github.com:nickmahdavi/functional-welfare.git [ -d review-harness ] || git clone git@github.com:nickmahdavi/review-harness.git [ -d fw-docs ] || git clone git@github.com:nickmahdavi/fw-docs.git cd setups bash install.sh cd ~/functional-welfare bash install.sh echo "Done" # :)