Ventoy icon indicating copy to clipboard operation
Ventoy copied to clipboard

Fixes for running under dash 0.5.11.2 and POSIX (1003.2) fixes

Open toazd opened this issue 5 years ago • 0 comments

For only the first fix lines 26->32 change "echo -en" to "printf" . Otherwise, when VentoryWorker.sh calls those functions all output produced by them is prefixed with "-e" because it is not defined in POSIX.

Other changes:

  1. Quotes where needed when globbing/word-splitting is undesired (will need review to ensure word-splitting is undesired)
  2. Replace expr with $((..))
  3. Replace egrep with grep -E (more portable)
  4. Replace echo -e with printf and separate format string (SC2039: In POSIX sh, echo flags are undefined)

This PR and the previous one I made earlier (regarding unexpected operator on line 45) both fix all issues I have had this morning using Ventoy in a POSIX (dash) environment.

toazd avatar Nov 17 '20 13:11 toazd