diff options
Diffstat (limited to 'make.sh')
-rwxr-xr-x[-rw-r--r--] | make.sh | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,4 +1,14 @@ -#!/usr/bin/zsh +#!/bin/sh -rm config.h -make install +if command -v nproc >/dev/null 2>&1; then + cores=$(nproc) +elif command -v sysctl >/dev/null 2>&1; then + cores=$(sysctl -n hw.ncpu) +else + echo "Error: Unable to determine the number of CPU cores." + exit 1 +fi + +make clean; +yes | rm config.h; +make -j"$cores" && echo "Now run "doas make install" to install DWM" || echo "Error" |