From 0647816d98d44eda2dac45affd5b4640dd946114 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sun, 6 Apr 2014 23:19:54 +0000 Subject: [PATCH] found another small bug/issue, which will impact probably nobody, inxi was using an obsolete kde command kde-config rather than the current: kde4-config, so now it tests if the commands exist, tries kde4, then kde5 then kde this is probably not used by any distro so it does not matter, but it was wrong so it's fixed now. --- inxi | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/inxi b/inxi index ff88d91..32a5fbc 100755 --- a/inxi +++ b/inxi @@ -630,7 +630,7 @@ main() { eval $LOGFS - local color_scheme='' + local color_scheme='' kde_config_app='' # this will be used by all functions following local Ps_aux_Data="$( ps aux )" @@ -685,18 +685,28 @@ main() DCTARGET="$2" ##dbus testing shift 2 fi - + # always have the current stable kde version tested first, + # then use fallbacks and future proofing + if type -p kde4-config &>/dev/null;then + kde_config_app='kde4-config' + elif type -p kde5-config &>/dev/null;then + kde_config_app='kde5-config' + elif type -p kde-config &>/dev/null;then + kde_config_app='kde-config' + fi # The section below is on request of Argonel from the Konversation developer team: # it sources config files like $HOME/.kde/share/apps/konversation/scripts/inxi.conf - IFS=":" - for kde_config in $( kde-config --path data ) - do - if [[ -r $kde_config$KONVI_CFG ]];then - source "$kde_config$KONVI_CFG" - break - fi - done - IFS="$ORIGINAL_IFS" + if [[ -n $kde_config_app ]];then + IFS=":" + for kde_config in $( $kde_config_app --path data ) + do + if [[ -r $kde_config$KONVI_CFG ]];then + source "$kde_config$KONVI_CFG" + break + fi + done + IFS="$ORIGINAL_IFS" + fi fi ## leave this for debugging dcop stuff if we get that working @@ -4893,6 +4903,7 @@ get_gcc_system_version() log_function_data "A_GCC_VERSIONS: $a_temp" eval $LOGFE } + get_gpu_temp_data() { local gpu_temp='' gpu_fan='' screens='' screen_nu='' gpu_temp_looper=''