#!/bin/bash set -e if [ ${PWD} != "/home/tmu/dotfiles" ]; then echo "Not in ~/dotfiles, proceed manually" exit 1 fi git submodule update --init --recursive # handle files and symlinks awk -f install.awk ensureddirs.csv symlinks.csv # build various tools cd dwm ./setup.sh cd .. cd st ./setup.sh cd .. cd slstatus ./setup.sh cd .. EMACSFULL="--with-x-toolkit=gtk3 --disable-build-details --with-cairo \ --with-harfbuzz --with-libsystemd=no --with-modules" EMACSMIN="--without-all \ --with-x-toolkit=no --without-xwidgets --without-x --without-ns --disable-ns-self-contained \ --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no \ --without-internationalization --without-tree-sitter --without-mailutils" EMACSALWAYS="--with-gnutls --with-file-notification=yes --with-native-compilation=yes --with-zlib=yes" if [[ "$(read -e -p 'Build minimal emacs? [y/N]> '; echo $REPLY)" == [Yy]* ]]; then EMACSOPT="${EMACSMIN} ${EMACSALWAYS}" else EMACSOPT="${EMACSFULL} ${EMACSALWAYS}" fi cd emacs-source ./autogen.sh ./configure --prefix="${HOME}/.local" \ ${EMACSOPT} \ CFLAGS='-O2 -pipe' make make install cd .. echo "All set up, remember to source ~/.bash_profile"