Skip to content

Commit

Permalink
src/winusb: Use printf instead of echo for printing multi-line message
Browse files Browse the repository at this point in the history
This allows printing strings without multiple calls, also we made the string immune to translation error by removing escape sequences in every translatable strings

Signed-off-by: 林博仁 <[email protected]>
  • Loading branch information
brlin-tw committed Jun 1, 2017
1 parent d41a862 commit 091167c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/winusb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ init(){
fi

if [ ! "$(id -u)" = 0 ]; then
echo "Warning: You are not running WinUSB as root! This might be the reason of the following failure." >&2
printf --\
"%s\n%s\n"\
"Warning: You are not running WinUSB as root!"\
"Warning: This might be the reason of the following failure." >&2
fi

if ! check_runtime_parameters; then
Expand Down

0 comments on commit 091167c

Please sign in to comment.