wip
This commit is contained in:
parent
65da0103d8
commit
e9c4a26387
3 changed files with 31 additions and 22 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGE=hyprgraphics
|
||||
unset PACKAGE &&
|
||||
PACKAGE=hyprgraphics
|
||||
|
||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||
command_exists() {
|
||||
|
@ -59,7 +60,7 @@ getDependencies() {
|
|||
# │ automagically be pulled via the $pkgArray[$distro] variable │
|
||||
# ╰─────────────────────────────────────────────────────────────────────────╯
|
||||
#
|
||||
depsDebian=(libpixman-1-dev libcairo2-dev cmake wayland-protocols hyprutils)
|
||||
depsDebian=(libpixman-1-dev libcairo2-dev cmake wayland-protocols libwebp-dev libjpeg-dev libspng-dev libmagic-dev hyprutils)
|
||||
depsArch=(hyprutils)
|
||||
# depsFedora=()
|
||||
# depsOpensuse=()
|
||||
|
@ -96,29 +97,35 @@ getDependencies() {
|
|||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
echo_info "Building $PACKAGE"
|
||||
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)
|
||||
}
|
||||
|
||||
cloneAndInstall() {
|
||||
local cloneDir="$(mktemp -d)"
|
||||
cd $cloneDir || mkdir -p "$cloneDir" && cd "$cloneDir"
|
||||
|
||||
git clone --depth=1 https://github.com/hyprwm/hyprgraphics.git &&
|
||||
cd hyprgraphics
|
||||
|
||||
if build; then
|
||||
echo_info "Installing package.."
|
||||
$_sudo cmake --install build
|
||||
else
|
||||
echo_error "Build has failed for $distro compiling $PACKAGE"
|
||||
return 69
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
case "$distro" in
|
||||
arch)
|
||||
echo "arch"
|
||||
_install hyprgraphics
|
||||
;;
|
||||
debian)
|
||||
echo "debian"
|
||||
;;
|
||||
ubuntu)
|
||||
echo "ubuntu"
|
||||
;;
|
||||
fedora)
|
||||
echo "fedora"
|
||||
;;
|
||||
alpine)
|
||||
echo "alpine"
|
||||
;;
|
||||
opensuse)
|
||||
echo "opensuse"
|
||||
;;
|
||||
*)
|
||||
echo "$distro is not supported by this script!"
|
||||
exit 1
|
||||
cloneAndInstall
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGE=hyprutils
|
||||
unset PACAKGE &&
|
||||
PACKAGE=hyprutils
|
||||
|
||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||
command_exists() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue