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() {
local cloneDir="$(mktemp -d)"
local cloneDirUtils="$(mktemp -d)"
# 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 &&
cd hyprutils
if buildUtils; then
echo_info "Installing package.."
echo_info "Installing hyprutils.."
$_sudo cmake --install build
else
echo_error "Build has failed for $distro compiling $package"
echo_error "Build has failed for $distro compiling hyprutils"
return 69
fi
}
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 --build ./build --config Release --target hyprlock -j$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)
}
@ -168,10 +168,10 @@ cloneAndBuildLock() {
cd hyprlock
if build; then
echo_info "Installing $PACKAGE.."
echo_info "Installing hyprlock.."
$_sudo cmake --install build
else
echo_error "Build has failed for $distro compiling $package"
echo_error "Build has failed for $distro compiling hyprlock"
return 69
fi
}
@ -182,14 +182,6 @@ main() {
_install hyprlock
;;
debian)
# if ! command_exists hyprutils; then
# cloneAndBuildUtils
# fi
#
# if ! command_exists hyprgraphics; then
# cloneAndBuildGraphics
# fi
cloneAndBuildLock
;;
*)