Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
adding check if battery string is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Hann committed Oct 30, 2015
1 parent baa6885 commit 6050fbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/archey
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ fieldlist[${#fieldlist[@]}]="${textColor}Packages:${normal} ${packagehandler}${n
fieldlist[${#fieldlist[@]}]="${textColor}CPU:${normal} ${cpu}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Memory:${normal} ${ram}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Disk:${normal} ${disk}${normal}"
fieldlist[${#fieldlist[@]}]="${textColor}Battery:${normal} ${battery}${normal}"
if [ ! -z $battery ]; then
fieldlist[${#fieldlist[@]}]="${textColor}Battery:${normal} ${battery}${normal}"
fi
if [ "${opt_offline}" = f ]; then
fieldlist[${#fieldlist[@]}]="${textColor}IP Address:${normal} ${ip}${normal}"
fi
Expand Down

0 comments on commit 6050fbc

Please sign in to comment.