summaryrefslogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
committersumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
commit76424950e373d3b04ac3dd13019151bfba3e8423 (patch)
tree4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /run.sh
Add the files
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..55071e4
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env sh
+
+set -e
+
+mkdir -p build/
+cd build/
+
+cmake ..
+
+kernel_name="$(uname -s)"
+
+case "${kernel_name}" in
+ "Linux" | "MINGW"*)
+ cmake_build_args="-j$(nproc)"
+ ;;
+ "Darwin" | *"BSD" | "DragonFly")
+ cmake_build_args="-j$(sysctl -n hw.ncpu)"
+ ;;
+ *)
+ cmake_build_args=""
+ ;;
+esac
+
+cmake --build . --target fastfetch "${cmake_build_args}"
+
+./fastfetch "$@"