wip
This commit is contained in:
parent
4d7a4a6a90
commit
cdd601b34b
1 changed files with 6 additions and 5 deletions
11
hyprlock.sh
11
hyprlock.sh
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cores="$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)"
|
||||
|
||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||
command_exists() {
|
||||
command -v "$@" >/dev/null 2>&1
|
||||
|
@ -109,7 +111,7 @@ getDependencies() {
|
|||
buildGraphics() {
|
||||
echo_info "Building hyprgraphics"
|
||||
run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
run cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
|
||||
run cmake --build ./build --config Release --target all -j"$cores"
|
||||
}
|
||||
|
||||
cloneAndBuildGraphics() {
|
||||
|
@ -120,10 +122,10 @@ cloneAndBuildGraphics() {
|
|||
cd hyprgraphics
|
||||
|
||||
if buildGraphics; then
|
||||
echo_info "Installing package.."
|
||||
echo_info "Installing hyprgraphics.."
|
||||
$_sudo cmake --install build
|
||||
else
|
||||
echo_error "Build has failed for $distro compiling $PACKAGE"
|
||||
echo_error "Build has failed for $distro compiling hyprgraphics"
|
||||
return 69
|
||||
fi
|
||||
}
|
||||
|
@ -131,7 +133,7 @@ cloneAndBuildGraphics() {
|
|||
buildUtils() {
|
||||
echo_info "Building hyprutils"
|
||||
run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
run cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
|
||||
run cmake --build ./build --config Release --target all -j"$cores"
|
||||
}
|
||||
|
||||
cloneAndBuildUtils() {
|
||||
|
@ -154,7 +156,6 @@ cloneAndBuildUtils() {
|
|||
}
|
||||
|
||||
build() {
|
||||
local cores="$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)"
|
||||
echo_info "Building hyprlock"
|
||||
run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
|
||||
run cmake --build ./build --config Release --target hyprlock -j"$cores"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue