Files
appimage.github.io/code
Kurt Pfeifle 82651a7c1a Make "if [ ... ]" statements more robust
A condition of "if [ $TYPE -eq 2 ]" will only work if $TYPE is an integer and if it is not empty. This is not guaranteed (depending on the code path traversed before. If $TYPE is empty, the previous statement will trigger an error or warning message saying
         "bash: [: : integer expression expected"
or
         "bash: [: -eq: unary operator expected"
Hence it is more robust to change it into a string comparison, "if [ x$TYPE == x2 ]", where both sides are guaranteed to be treated as a string as well as have a non-empty value.
    
While I was at it, for consistency in coding style I bulk-converted other (pre-existing) string comparisons along similar lines, even if it didn't seem as critical.
2018-01-14 16:02:26 +01:00
..
2017-08-07 07:21:54 +02:00