+build script

This commit is contained in:
Aaron Bieber 2022-06-16 08:01:18 -06:00
parent 4b8fef2e5a
commit 67f5dcd4d0
1 changed files with 13 additions and 0 deletions

13
.xmonad/build Executable file
View File

@ -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}"