about summary refs log tree commit diff
path: root/build
diff options
context:
space:
mode:
authorazahi <azahi@teknik.io>2018-10-15 21:59:19 +0300
committerazahi <azahi@teknik.io>2018-10-15 21:59:19 +0300
commitef5f315a1a3491036c8afd762824644fc45f3a4e (patch)
tree6294e29d767e8ac3888363158d236b8ebe06b441 /build
parentModify stack/cabal for vendor packages (diff)
Allow building via `xmonad --recompile`
Add build executable with `cabal new-build` to be able to build
xmonad-arch-os
Include new temporary and residual files in .gitignore
Diffstat (limited to 'build')
-rwxr-xr-xbuild14
1 files changed, 14 insertions, 0 deletions
diff --git a/build b/build
new file mode 100755
index 0000000..9b1019a
--- /dev/null
+++ b/build
@@ -0,0 +1,14 @@
+#!/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" ';'

Consider giving Nix/NixOS a try! <3