#!/bin/bash set -e if [ ${PWD} != "/home/tmu/dotfiles" ]; then echo "Not in ~/dotfiles, proceed manually" exit 1 fi git submodule update --init --recursive confirm () { [[ "$(read -e -p "$1 [y/N]> "; echo $REPLY)" == [Yy]* ]] } if confirm "Check and install symlinks?"; then awk -f install.awk ensureddirs.csv symlinks.csv fi cd tree/src if confirm "Build and use tcc?"; then cd tcc ./setup.sh cd .. export CC=${HOME}/.local/bin/tcc fi if confirm "Build micro haskell?"; then cd microhs ./setup.sh cd .. fi if confirm "Build chicken scheme?"; then cd chicken ./setup.sh cd .. fi if confirm "Build dwm/st/slstatus/dmenu/unclutter?"; then cd dwm ./setup.sh cd .. cd dmenu ./setup.sh cd .. cd st ./setup.sh cd .. cd slstatus ./setup.sh cd .. fi if confirm "Build non-local tools (caps2esc) for openrc?"; then cd capslock ./setup.sh cd .. fi if confirm "Build Emacs?"; then cd emacs ./setup.sh cd .. fi echo "All set up, remember to source ~/.bash_profile and symlink tmubrowse and tmuterm."