aboutsummaryrefslogblamecommitdiff
path: root/dot_xmonad/executable_build
blob: fa37a66425379454aa7f3b60e765a7b7ba80d15d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
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}"