This commit is contained in:
pika 2025-05-16 11:08:10 +02:00
parent fd38a8b310
commit 07c9f93fc6

View file

@ -135,26 +135,26 @@ buildUtils() {
} }
cloneAndBuildUtils() { cloneAndBuildUtils() {
local cloneDir="$(mktemp -d)" local cloneDirUtils="$(mktemp -d)"
# local cloneDir="$HOME/.builds" # local cloneDir="$HOME/.builds"
cd $cloneDir || mkdir -p $cloneDir && cd $cloneDir cd $cloneDirUtils || mkdir -p $cloneDirUtils && cd $cloneDirUtils
echo_info "Cloning sources for $PACKAGE into $cloneDir/$PACKAGE" echo_info "Cloning sources for hyprutils into $cloneDirUtils/hyprutils"
git clone --depth=1 https://github.com/hyprwm/hyprutils.git && git clone --depth=1 https://github.com/hyprwm/hyprutils.git &&
cd hyprutils cd hyprutils
if buildUtils; then if buildUtils; then
echo_info "Installing package.." echo_info "Installing hyprutils.."
$_sudo cmake --install build $_sudo cmake --install build
else else
echo_error "Build has failed for $distro compiling $package" echo_error "Build has failed for $distro compiling hyprutils"
return 69 return 69
fi fi
} }
build() { build() {
echo_info "Building $package" echo_info "Building hyprlock"
run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build run cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -S . -B ./build
run cmake --build ./build --config Release --target hyprlock -j$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF) run cmake --build ./build --config Release --target hyprlock -j$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)
} }
@ -168,10 +168,10 @@ cloneAndBuildLock() {
cd hyprlock cd hyprlock
if build; then if build; then
echo_info "Installing $PACKAGE.." echo_info "Installing hyprlock.."
$_sudo cmake --install build $_sudo cmake --install build
else else
echo_error "Build has failed for $distro compiling $package" echo_error "Build has failed for $distro compiling hyprlock"
return 69 return 69
fi fi
} }
@ -182,14 +182,6 @@ main() {
_install hyprlock _install hyprlock
;; ;;
debian) debian)
# if ! command_exists hyprutils; then
# cloneAndBuildUtils
# fi
#
# if ! command_exists hyprgraphics; then
# cloneAndBuildGraphics
# fi
cloneAndBuildLock cloneAndBuildLock
;; ;;
*) *)