Auto-GPT-Plugin-Template icon indicating copy to clipboard operation
Auto-GPT-Plugin-Template copied to clipboard

Optimizes the helpers.sh script

Open AndresCdo opened this issue 1 year ago • 0 comments

Changes:

  • Use -f flag with rm command to avoid the need for redirection to /dev/null.
  • Combine all rm commands into a single line to improve performance.
  • Use "$@" instead of $1 to allow the script to accept multiple arguments.
  • Use printf instead of echo for better cross-platform compatibility.
  • Use set -euo pipefail at the beginning of the script to catch more errors.
  • Use command -v to check for the presence of a command before running it.
  • Use xargs instead of ** to improve performance and avoid issues with certain filenames.

AndresCdo avatar Apr 21 '23 16:04 AndresCdo