From 67f5dcd4d0cdcbf96edb3fd458a41fb03e7fa5a2 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Thu, 16 Jun 2022 08:01:18 -0600 Subject: [PATCH] +build script --- .xmonad/build | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .xmonad/build diff --git a/.xmonad/build b/.xmonad/build new file mode 100755 index 0000000..fa37a66 --- /dev/null +++ b/.xmonad/build @@ -0,0 +1,13 @@ +#!/bin/ksh -eu + +output_file="${1}" + +if [ "${output_file}" -nt xmonad.hs ] && [ "${output_file}" -nt /usr/local/bin/xmonad ]; then + echo "${output_file}" is newer than xmonad.hs + exit 0 +fi + +cabal v2-install exe:xmonad-config --overwrite-policy=always --install-method=copy + +[ -e "${output_file}" ] && mv -f "${output_file}" "${output_file}.old" +install "${HOME}/.cabal/bin/xmonad-config" "${output_file}"