Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ts_uinput_start.sh script #219

Merged
merged 2 commits into from Feb 7, 2024
Merged

Conversation

dsemkowicz-tt
Copy link
Contributor

@dsemkowicz-tt dsemkowicz-tt commented Jan 30, 2024

Running shellcheck on this script reported following problems: SC2010, SC2086, SC2236.

This MR includes following changes to ts_uinput_start.sh script:

  • Make script more portable by using sh
  • Fix warnings reported by shellcheck

This script is compatible with sh. This means, the shebang line
can be safely changed to point to sh instead of bash.
This allows to use this script on more platforms, especially when
only sh is available.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
There was unnecessary call to "ls". ts_uinput output can be grepped
directly for 'event' string, without creating additional variable.

Simplify "! -z" to "-n" as suggested by shellcheck.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
@merge
Copy link
Member

merge commented Jan 31, 2024

lgtm. thanks for the patches

@merge merge merged commit 9b7e7bc into libts:master Feb 7, 2024
@dsemkowicz-tt dsemkowicz-tt deleted the dev/sh branch February 9, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants