Fix for empty OS X variable

This commit is contained in:
Thomas Bouve
2014-02-03 12:32:55 +01:00
parent 21e7bc165d
commit c6150b29a9

View File

@@ -3134,7 +3134,7 @@ infoDisplay () {
if [[ "${display[@]}" =~ "uptime" ]]; then myuptime=$(echo -e "$labelcolor Uptime:$textcolor $uptime"); out_array=( "${out_array[@]}" "$myuptime" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "pkgs" ]]; then mypkgs=$(echo -e "$labelcolor Packages:$textcolor $pkgs"); out_array=( "${out_array[@]}" "$mypkgs" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "shell" ]]; then myshell=$(echo -e "$labelcolor Shell:$textcolor $myShell"); out_array=( "${out_array[@]}" "$myshell" ); ((display_index++)); fi
if [[ -n "$DISPLAY" ]]; then
if [[ -n "$DISPLAY" || "$distro" == "Mac OS X" ]]; then
if [[ "${display[@]}" =~ "res" ]]; then myres=$(echo -e "$labelcolor Resolution:${textcolor} $xResolution"); out_array=( "${out_array[@]}" "$myres" ); ((display_index++)); fi
if [[ "${display[@]}" =~ "de" ]]; then
if [[ "${DE}" != "Not Present" ]]; then