This PR removes the outdated 'x-hack' practice from all shell scripts in the codebase. The 'x-hack' was used to prevent errors when comparing variables that could potentially be undefined or empty. However, modern shells handle these cases more gracefully, making the 'x-hack' unnecessary.
The 'x-hack' instances were identified and replaced with a direct comparison. For example, '[ x$var = xval ]' has been replaced with '[ "$var" = "val" ]'.
Summary of Changes
Modified packages/bsp/nanopim4/nanopim4-pwm-fan.sh to remove 'x-hack'
Modified packages/blobs/grub/09_linux_with_dtb.sh to remove 'x-hack'
Modified lib/tools/shellcheck.sh to remove 'x-hack'
Modified lib/functions/artifacts/artifact-full_firmware.sh to remove 'x-hack'
Modified lib/functions/artifacts/artifact-kernel.sh to remove 'x-hack'
All modified scripts have been tested to ensure that they still function as expected without the 'x-hack'.
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 removes the outdated 'x-hack' practice from all shell scripts in the codebase. The 'x-hack' was used to prevent errors when comparing variables that could potentially be undefined or empty. However, modern shells handle these cases more gracefully, making the 'x-hack' unnecessary.
The 'x-hack' instances were identified and replaced with a direct comparison. For example, '[ x$var = xval ]' has been replaced with '[ "$var" = "val" ]'.
Summary of Changes
packages/bsp/nanopim4/nanopim4-pwm-fan.sh
to remove 'x-hack'packages/blobs/grub/09_linux_with_dtb.sh
to remove 'x-hack'lib/tools/shellcheck.sh
to remove 'x-hack'lib/functions/artifacts/artifact-full_firmware.sh
to remove 'x-hack'lib/functions/artifacts/artifact-kernel.sh
to remove 'x-hack'All modified scripts have been tested to ensure that they still function as expected without the 'x-hack'.
Fixes #4.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: