aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

fix: default variable assignment and `tar` command syntax

Open mdqst opened this issue 8 months ago • 0 comments

TITLE

Description

I’ve corrected two issues in the script:

  1. The syntax for setting the default value for the NODE_EXPORTER_DIR variable was wrong. The corrected version now properly uses :- for default assignment in Bash:

    NODE_EXPORTER_DIR="${NODE_EXPORTER_DIR:-"$BASE_DIR/.node_exporter"}"
    

    This ensures that if NODE_EXPORTER_DIR isn’t set, it defaults to $BASE_DIR/.node_exporter.

  2. Fixed the incorrect order of flags in the tar command. The -z flag for gzip compression should follow -x and precede -v. The corrected command is:

    if tar -xvzf $FILE; then
    

Both changes ensure the script runs without errors in these areas.

Type of change

Please delete options that are not relevant.

  • [x] Optimization

Checklist

  • [ ] “Hotfix” to testnet, everything else to staging
  • [ ] Linked to Github Issue
  • [ ] This change depends on code or research by an external entity
    • [ ] Acknowledgements were updated to give credit
  • [ ] Unit tests added
  • [ ] This change requires new documentation.
    • [ ] Documentation has been added/updated.
  • [ ] This change is an Optimization
    • [ ] Benchmarks added/run
  • [ ] Has a known issue
    • Link to the open issue addressing it
  • [ ] If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • [ ] This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • [ ] This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

mdqst avatar Apr 21 '25 12:04 mdqst