summary refs log tree commit diff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbuild.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..dfcf5c1
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env sh
+
+echo 'Cleaning up previous builds...'
+rm -rf build
+mkdir build
+
+echo 'Copying fresh sources'
+cp -rf dwm-src/* build
+
+echo 'Enumerating patches...'
+cd patches
+find * | sort -n | tee ../build/patches.lst
+
+echo 'Applying patches...'
+cd ../build
+cat patches.lst | while read p;
+do
+		echo "Applying patch \"${p}\"..."
+		if ! patch -sp1 < ../patches/$p; then
+				echo "Patch ${p} failed!!! Aborting."
+				exit 1
+		fi
+done