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

Replace 'x-hack' with direct comparison operators #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sweep-nightly[bot]
Copy link

@sweep-nightly sweep-nightly bot commented Sep 19, 2023

Description

This PR replaces the 'x-hack' comparison method with direct comparison operators in the following files:

  • lib/functions/artifacts/artifact-armbian-base-files.sh
  • lib/functions/artifacts/artifacts-reversion.sh
  • lib/functions/artifacts/artifact-uboot.sh
  • lib/functions/artifacts/artifacts-obtain.sh
  • lib/functions/rootfs/distro-specific.sh

The 'x-hack' method is used in shell scripting to prevent errors when comparing variables that could be potentially undefined or empty. However, in modern bash scripting, direct comparison operators can handle these cases and are more readable and straightforward.

Summary of Changes

  • Replaced all instances of 'x-hack' with direct comparison operators in the mentioned files.
  • Ensured that the replacement does not affect the logic of the code.

This PR contributes to the resolution of issue #83.

Fixes #83.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants