From 32ab49d3822e437a1c4de12d92492369e4e46d37 Mon Sep 17 00:00:00 2001 From: dell Date: Sun, 30 Mar 2025 05:25:37 +0500 Subject: [PATCH] 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 --- build.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/build.sh b/build.sh index 2c73f14..c679f34 100755 --- a/build.sh +++ b/build.sh @@ -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 {