about summary refs log tree commit diff
path: root/build
diff options
context:
space:
mode:
authorazahi <azahi@teknik.io>2019-10-13 00:37:18 +0300
committerazahi <azahi@teknik.io>2019-10-13 00:37:18 +0300
commit9d4ef5a7da43808ee659caa4e4df4d53497bd53a (patch)
tree806b8891a290ab5462e6f270a0b592655d1456b9 /build
parentAdd build scripts (diff)
fix build script error and update stack
Diffstat (limited to '')
-rwxr-xr-x[l---------]build19
1 files changed, 18 insertions, 1 deletions
diff --git a/build b/build
index 38d2cab..aa11764 120000..100755
--- a/build
+++ b/build
@@ -1 +1,18 @@
-build-scripts/build-cabal
\ No newline at end of file
+#!/bin/sh -eu
+
+SRC_DIR="$HOME/.xmonad"
+EXE_NAME="xmonad-ng"
+OUT="$1"
+
+shift
+
+cd "$SRC_DIR" || exit 1
+
+cabal new-configure \
+	--enable-optimization \
+	--enable-executable-stripping
+
+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