MatthewCroughan / octobalena

Control your 3d-printer with octoprint + octoscreen via balena!
GNU General Public License v2.0
49 stars 22 forks source link

Printer name bug, fix #2 #5

Closed MatthewCroughan closed 4 years ago

MatthewCroughan commented 4 years ago

This fixes #2

Explanation from the issue:

The issue was two fold. I had mistakenly used -z in the bash logic rather than -n which is the opposite logic that I intended. I always get this wrong as I remember "-n" as meaning "not" which is not the case!

From man bash section CONDITIONAL EXPRESSIONS Run this command if you wish to see it man --pager='less -p ^CONDITIONAL\ EXPRESSIONS' bash

       -z string
              True if the length of string is zero.
       string
       -n string
              True if the length of string is non-zero.