Updated make.sh script for both Gnu/Linux and BSD
This commit is contained in:
parent
3ed68b6208
commit
3aafbdf0c1
BIN
drw.o
BIN
drw.o
Binary file not shown.
BIN
dwm
BIN
dwm
Binary file not shown.
BIN
dwm.o
BIN
dwm.o
Binary file not shown.
16
make.sh
Normal file → Executable file
16
make.sh
Normal file → Executable file
@ -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"
|
||||
|
BIN
util.o
BIN
util.o
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user