diff --git a/eos-script-lib-yad b/eos-script-lib-yad index 0fdff34..c5df8f1 100644 --- a/eos-script-lib-yad +++ b/eos-script-lib-yad @@ -31,20 +31,7 @@ source /etc/eos-script-lib-yad.conf # for EOS_ROOTER and other configs export EOS_WICON=/usr/share/endeavouros/EndeavourOS-icon.png export EOS_YAD_STARTER_CMD="/usr/bin/yad --window-icon=$EOS_WICON" -eos_yad_orig() { GDK_BACKEND=x11 $EOS_YAD_STARTER_CMD "$@"; } -eos_yad_chk() { # eos_yad() with a check that the required 'yad' package is installed - if [ -x /usr/bin/yad ] ; then - eos_yad_orig "$@" - else - echo "${BASH_SOURCE[1]##*/}: error: this app requires package 'yad'" >&2 - exit 1 - fi -} - -case "$EOS_USE_TEST_FOR_YAD" in - yes) eos_yad() { eos_yad_chk "$@" ; } ;; - *) eos_yad() { eos_yad_orig "$@" ; } ;; -esac +eos_yad() { GDK_BACKEND=x11 $EOS_YAD_STARTER_CMD "$@"; } translations_dir=/usr/share/endeavouros/scripts # needed in translations.bash source $translations_dir/translations.bash || { @@ -70,7 +57,7 @@ eos-assert-deps() { # params: prog deps local failcount=0 local dep for dep in "$@" ; do - which "$dep" &>/dev/null || { + expac %n "$dep" &>/dev/null || { echo "==> $prog requires package '$dep'" >&2 ((failcount++)) } @@ -78,17 +65,6 @@ eos-assert-deps() { # params: prog deps return $failcount } -eos-assert-deps-fast() { # params: prog deps - local -r prog="$1" - shift - local failcount=0 - which "$@" &>/dev/null || { - failcount=$? - echo "==> $prog: missing $failcount of packages: $*" - } - return $failcount -} - eos_icon_path() { # on success, echo full icon path and return 0 # on failure, return 1