about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rwxr-xr-xbuild14
2 files changed, 21 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index f11ea6a..30d2479 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,12 @@
+*.hi
+*.o
 .cabal-sandbox/
+.ghc.*
 .stack-work/
+cabal.project.*
 cabal.sandbox.config
+dist-newstyle/
 dist/
 prompt-history
+xmonad-*-*
+xmonad.errors
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