xmonad-contrib/scripts/build/build-with-stack.sh
brandon s allbery kf8nh b6d62fe9d3 migrate build scripts from xmonad-testing
The testing repo was not a good location for them, and is now
deprecated. They are now in `scripts/build`, and will be documented
in the main repo's `INSTALL.md`.
2022-04-18 17:30:51 -04:00

24 lines
757 B
Bash
Executable File

#!/bin/sh -eu
################################################################################
# Edit the following constants and then rename this script to ~/.xmonad/build
# The directory holding your source code and stack.yaml file:
SRC_DIR=~/develop/oss/xmonad-testing
# The name of the executable produced by stack. This comes from the
# executable section of your *.cabal or package.yaml file.
EXE_NAME=xmonad-testing
################################################################################
# Unset STACK_YAML, to ensure that $SRC_DIR/stack.yaml is used.
unset STACK_YAML
# Do the build.
cd $SRC_DIR
stack build
# Create a hard link at the requested destination, replacing any existing one.
ln -f -T $(stack exec -- which $EXE_NAME) $1