dmenupatches - commit 9a6a761
feat: bring in fresh instance of dmenu with each run9a6a761085509affd5e22cac2424db66f04315a3LukeJ<luke.jones.2567@gmail.com>2026-09-28T19:27:41+01:00diff --git a/build.sh b/build.sh
index 92663c8..0a0e56b 100644
--- a/build.sh
+++ b/build.sh
@@ -1,28 +1,20 @@
#!/bin/sh
set -eu
-if [ "$#" -ne 1 ]; then
- printf 'Usage: %s /path/to/dmenu\n' "$0" >&2
- exit 1
-fi
-
-DMENU_SRC=$1
-
-if [ ! -d "$DMENU_SRC" ]; then
- printf 'Error: dmenu source directory does not exist: %s\n' "$DMENU_SRC" >&2
- exit 1
-fi
+DMENU_SRC="/tmp/dmenu"
+SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
-if [ ! -f "$DMENU_SRC/config.mk" ] || [ ! -f "$DMENU_SRC/dmenu.c" ]; then
- printf 'Error: %s does not appear to be a dmenu source tree\n' "$DMENU_SRC" >&2
- exit 1
-fi
+printf '%s\n' "Removing existing dmenu source..."
+rm -rf "$DMENU_SRC"
-# Resolve the directory containing this script before changing directory.
-SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+printf '%s\n' "Cloning dmenu..."
+git clone https://git.suckless.org/dmenu "$DMENU_SRC"
cd "$DMENU_SRC"
+printf '%s\n' "Checking out dmenu 5.3..."
+git checkout 5.3
+
printf '%s\n' "Applying patches from: $SCRIPT_DIR"
found=0