#!/usr/bin/env bash SRC_DIR="$HOME/.xmonad" EXE_NAME="xmonad-ng" OUT="$1" cd "$SRC_DIR" || exit 1 cabal new-configure --enable-optimization cabal new-build find "$SRC_DIR"/dist-newstyle -type f -executable -name "$EXE_NAME" \ -exec mv -u '{}' "$OUT" ';'