From c9b53cdbcd34f7129a813fe0f6a9d30ad0c1be58 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 17 Mar 2014 04:13:32 +0000 Subject: [PATCH] bsd bash doesn't like the *"value"* bash test, so had to remove it. --- inxi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inxi b/inxi index b173308..ff86f12 100755 --- a/inxi +++ b/inxi @@ -813,9 +813,9 @@ initialize_data() BSD_VERSION=$( uname -s 2>/dev/null | tr '[A-Z]' '[a-z]' ) # note: archbsd says they are a freebsd distro, so assuming it's the same as freebsd - if [[ *"bsd"* == "$BSD_VERSION" ]];then + if [[ -n $( grep 'bsd' <<< "$BSD_VERSION" ) ]];then # GNU/kfreebsd will by definition have GNU tools like sed/grep - if [[ *"kfreebsd"* == "$BSD_VERSION" ]];then + if [[ -n $( grep 'kfreebsd' <<< "$BSD_VERSION" ) ]];then BSD_TYPE='debian-bsd' # debian gnu bsd else BSD_TYPE='bsd' # all other bsds @@ -3109,7 +3109,7 @@ get_irc_client_version() print $2 }' )" if [[ -n $IRC_CLIENT_VERSION ]] && \ - [[ *"limnoria"* == $IRC_CLIENT_VERSION || $App_Working_Name == 'limnoria' ]];then + [[ -n $( grep 'limnoria' <<< $IRC_CLIENT_VERSION ) || $App_Working_Name == 'limnoria' ]];then IRC_CLIENT="Limnoria" else IRC_CLIENT="Supybot" @@ -6441,7 +6441,7 @@ get_optical_drive_data() fi disk=${disk##*/} # puppy shows this as /dev/sr0, not sr0 # if [[ -z $dev_disks_real || -z $( grep $disk <<< $dev_disks_real ) ]];then - if [[ -n $disk && *"$disk"* != $dev_disks_real ]];then + if [[ -n $disk && -z $( grep "$disk" <<< $dev_disks_real ) ]];then # need line break IFS for below, no white space dev_disks_real="$dev_disks_real$separator$disk" separator=$'\n'