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

Fix optional shellcheck warnings for hook.sh #85

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

Emantor
Copy link
Member

@Emantor Emantor commented Dec 12, 2023

Fix some minor optional shellcheck warnings within hook.sh.

Fix an optional shellcheck warning to use double square brackets for bash
scripts:

  In meta-lxatac-software/recipes-core/bundles/files/hook.sh line 26:
  			if [ "${bundle_hash}" == "${cert_hash}" ]; then
                             ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

  In meta-lxatac-software/recipes-core/bundles/files/hook.sh line 39:
  	if [ ! -f "$1" ]; then
             ^-----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Signed-off-by: Rouven Czerwinski <[email protected]>
Fix an optional shellcheck warning:

  In meta-lxatac-software/recipes-core/bundles/files/hook.sh line 60:
  			migrate "$x"
                                   ^-- SC2250 (style): Prefer putting braces around variable references even when not strictly required.

Signed-off-by: Rouven Czerwinski <[email protected]>
Copy link
Member

@hnez hnez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

This PR inspired me to add a CI job for shellcheck to meta-lxatac. See #86 for that.
We have to figure out why it does not run though, but I can already tell that there is a lot more potential for improvement.

But as an incremental improvement this is already great.

@hnez hnez merged commit 461ee86 into linux-automation:mickledore Dec 12, 2023
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.

2 participants