fastfetch/run.sh

23 lines
453 B
Bash
Raw Normal View History

2022-09-07 06:37:35 -07:00
#!/usr/bin/env sh
set -e
2021-02-18 22:25:36 +01:00
mkdir -p build/
cd build/
2022-09-19 19:19:09 +02:00
2022-09-22 23:10:34 +02:00
if [ -z "${CMAKE_BUILD_TYPE}" ]; then
CMAKE_BUILD_TYPE=Release
fi
cmake "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" ..
2022-09-23 01:27:25 +02:00
if [ -z "$OSTYPE" ] || [ "$OSTYPE" = "linux-gnu" ]; then
2022-09-22 23:10:34 +02:00
cmake_build_args="-j$(nproc)"
2022-09-23 01:27:25 +02:00
elif [ "$OSTYPE" = "darwin" ]; then
2022-09-23 00:49:43 +02:00
cmake_build_args="-j$(sysctl -n hw.ncpu)"
2022-09-19 19:19:09 +02:00
else
2022-09-22 23:10:34 +02:00
cmake_build_args=""
2022-09-19 19:19:09 +02:00
fi
2022-09-22 23:10:34 +02:00
cmake --build . --target fastfetch ${cmake_build_args}
2022-09-19 19:19:09 +02:00
2021-02-20 20:00:06 +01:00
./fastfetch "$@"