feat: cli options

This commit is contained in:
2026-01-15 03:56:26 +01:00
parent 92ba8738fe
commit f71273a7df
10 changed files with 268 additions and 168 deletions
+4 -9
View File
@@ -1,4 +1,4 @@
#!/bin/env bash
#!/usr/bin/env bash
set -euo pipefail
@@ -9,15 +9,10 @@ path="$(dirname "$(readlink -f "$0")")"
cmake -S "$path/.." -B "$path/../build" \
-DCMAKE_INSTALL_PREFIX="$prefix"
cmake --build "$path/../build"
cmake --build "$path/../build" --config Release -- -j"$(nproc)"
if [ ! -w "$prefix" ] && [ "$(id -u)" -ne 0 ]; then
sudo cmake --install "$path/../build"
sudo cmake --install "$path/../build" --config Release
else
cmake --install "$path/../build"
fi
if command -v update-desktop-database &>/dev/null; then
echo "Updating desktop database..."
update-desktop-database "$prefix"/share/applications/ || true
cmake --install "$path/../build" --config Release
fi