summaryrefslogtreecommitdiff
path: root/make.sh
blob: a5ffa6906ab8139de545cf7d667063923d597f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

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"