diff options
Diffstat (limited to '')
l---------[-rwxr-xr-x] | build | 15 | ||||
-rwxr-xr-x | build-scripts/build-cabal | 18 | ||||
-rwxr-xr-x | build-scripts/build-cabal-sandbox | 22 | ||||
-rwxr-xr-x | build-scripts/build-stack | 15 |
4 files changed, 56 insertions, 14 deletions
diff --git a/build b/build index 6764e6a..38d2cab 100755..120000 --- a/build +++ b/build @@ -1,14 +1 @@ -#!/bin/sh - -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" ';' +build-scripts/build-cabal \ No newline at end of file diff --git a/build-scripts/build-cabal b/build-scripts/build-cabal new file mode 100755 index 0000000..aa11764 --- /dev/null +++ b/build-scripts/build-cabal @@ -0,0 +1,18 @@ +#!/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" ';' diff --git a/build-scripts/build-cabal-sandbox b/build-scripts/build-cabal-sandbox new file mode 100755 index 0000000..435fa43 --- /dev/null +++ b/build-scripts/build-cabal-sandbox @@ -0,0 +1,22 @@ +#!/bin/sh -eu + +SRC_DIR="$HOME/.xmonad" +EXE_NAME="xmonad-ng" +OUT="$1" + +shift + +cd "$SRC_DIR" || exit 1 + +cabal sandbox init + +cabal configure \ + --enable-optimization \ + --enable-executable-stripping + +cabal install --only-dependencies + +cabal build + +find "$SRC_DIR"/dist -type f -executable -name "$EXE_NAME" \ + -exec mv -u '{}' "$OUT" ';' diff --git a/build-scripts/build-stack b/build-scripts/build-stack new file mode 100755 index 0000000..235b826 --- /dev/null +++ b/build-scripts/build-stack @@ -0,0 +1,15 @@ +#!/bin/sh -eu + +SRC_DIR="$HOME/.xmonad" +EXE_NAME="xmonad-ng" +OUT="$1" + +shift + +unset STACK_YAML + +cd "$SRC_DIR" || exit 1 + +stack build + +ln -f -T "$(stack exec -- which $EXE_NAME)" "$1" |