fix dependencies check and install

- spaces to tabs for consistency with the rest of the file
- the command check was broken, fixed
- xcursorgen is now part of the x11-apps pkg on ubuntu; added install... for it; switched apt to apt-get (stable cli)
- changed the pkg name to the valid one for other distros
This commit is contained in:
dell
2025-03-30 05:25:37 +05:00
parent c8759f13de
commit 32ab49d382

View File

@@ -2,37 +2,37 @@
# check command avalibility
has_command() {
"$1" -v $1 > /dev/null 2>&1
command -v "$1" >/dev/null 2>&1
}
if [ ! "$(which xcursorgen 2> /dev/null)" ]; then
echo xorg-xcursorgen needs to be installed to generate the cursors.
if has_command zypper; then
sudo zypper in xorg-xcursorgen
elif has_command apt; then
sudo apt install xorg-xcursorgen
elif has_command dnf; then
sudo dnf install -y xorg-xcursorgen
elif has_command dnf; then
sudo dnf install xorg-xcursorgen
elif has_command pacman; then
sudo pacman -S --noconfirm xorg-xcursorgen
fi
echo xorg-xcursorgen needs to be installed to generate the cursors.
if has_command zypper; then
sudo zypper in xcursorgen
elif has_command apt-get; then
sudo apt-get install -y xorg-xcursorgen || sudo apt-get install -y x11-apps
elif has_command dnf; then
sudo dnf install -y xcursorgen
elif has_command yum; then
sudo dnf install -y xcursorgen
elif has_command pacman; then
sudo pacman -S --noconfirm xorg-xcursorgen
fi
fi
if [ ! "$(which inkscape 2> /dev/null)" ]; then
echo inkscape needs to be installed to generate the cursors.
if has_command zypper; then
sudo zypper in inkscape
elif has_command apt; then
sudo apt install inkscape
elif has_command dnf; then
sudo dnf install -y inkscape
elif has_command dnf; then
sudo dnf install inkscape
elif has_command pacman; then
sudo pacman -S --noconfirm inkscape
fi
echo inkscape needs to be installed to generate the cursors.
if has_command zypper; then
sudo zypper in inkscape
elif has_command apt-get; then
sudo apt-get install -y inkscape
elif has_command dnf; then
sudo dnf install -y inkscape
elif has_command yum; then
sudo dnf install -y inkscape
elif has_command pacman; then
sudo pacman -S --noconfirm xorg-xcursorgen
fi
fi
function create {