feat: cli options
This commit is contained in:
+4
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user