This PR replaces all instances of the 'x-hack' in the codebase with a more modern and reliable approach for checking variable values. The 'x-hack' is an outdated shell scripting practice that was used to ensure compatibility across different shells and systems. It involves adding an 'x' before a variable and its value in a conditional statement, for example, [ "x${var}" = "xval" ] or [ x$var = xval ]. This practice is now considered obsolete as modern shells have evolved to be more reliable.
The changes were made in the following files:
packages/bsp/nanopim4/nanopim4-pwm-fan.sh
packages/blobs/grub/09_linux_with_dtb.sh
lib/tools/shellcheck.sh
lib/functions/artifacts/artifact-firmware.sh
lib/functions/artifacts/artifacts-reversion.sh
In each file, instances of the 'x-hack' were replaced with [ "${var}" = "val" ].
Summary of Changes
Replaced all instances of the 'x-hack' in the scripts with a more modern and reliable approach for checking variable values.
Ensured that the changes do not break the functionality of the scripts.
Fixes #4.
🎉 Latest improvements to Sweep:
Getting Sweep to run linters before committing! Check out Sweep Sandbox Configs to set it up.
Added support for self-hosting! Check out Self-hosting Sweep to get started.
[Self Hosting] Multiple options to compute vector embeddings, configure your .env file using VECTOR_EMBEDDING_SOURCE
💡 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
Description
This PR replaces all instances of the 'x-hack' in the codebase with a more modern and reliable approach for checking variable values. The 'x-hack' is an outdated shell scripting practice that was used to ensure compatibility across different shells and systems. It involves adding an 'x' before a variable and its value in a conditional statement, for example, [ "x${var}" = "xval" ] or [ x$var = xval ]. This practice is now considered obsolete as modern shells have evolved to be more reliable.
The changes were made in the following files:
packages/bsp/nanopim4/nanopim4-pwm-fan.sh
packages/blobs/grub/09_linux_with_dtb.sh
lib/tools/shellcheck.sh
lib/functions/artifacts/artifact-firmware.sh
lib/functions/artifacts/artifacts-reversion.sh
In each file, instances of the 'x-hack' were replaced with [ "${var}" = "val" ].
Summary of Changes
Fixes #4.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: