Skip to content

scripts: refactor and review #12

@noahehall

Description

@noahehall

moving pretty fast and not following best practices

  • ensure atleast set -eu at top
  • no hardcoded values, vars et at top
  • no logic embedded in case structs; call functions at top
  • no multi level if statements: use case structs
  • no hella long if else if, else if, else ifs, use case statements
  • ensure help is provided if invalid input received
  • add DEBUG=${NIRV_SCRIPT_DEBUG:-''} to all scripts to enable debugging via 1 env var (see script.vault.sh)
  • update nirvai/docs/scripts readme.md
    • ensure interfaces are clearly stated
    • ensure all copypasta works
    • ensure basic workflow provided
  • no bash, keep it posix compliant (there might be a ticket for this already)
  • decompose into multiple files, e.g. they should all share the same base interface

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    FAST lane

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions