Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is the Variables and pluging scoping README example right? #253

Open
jgomo3 opened this issue Aug 14, 2019 · 0 comments
Open

Is the Variables and pluging scoping README example right? #253

jgomo3 opened this issue Aug 14, 2019 · 0 comments

Comments

@jgomo3
Copy link

jgomo3 commented Aug 14, 2019

It says:

_GO_ROOTDIR: /absolute/path/to/project-root
_GO_CORE_DIR: /absolute/path/to/project-root/scripts/go-script-bash
_GO_SCRIPTS_DIR: $_GO_ROOTDIR/scripts
_GO_PLUGINS_DIR: /absolute/path/to/project-root/plugins

When I think it should say

_GO_ROOTDIR: /absolute/path/to/project-root
_GO_CORE_DIR: /absolute/path/to/project-root/scripts/go-script-bash
_GO_SCRIPTS_DIR: $_GO_ROOTDIR/scripts
_GO_PLUGINS_DIR: /absolute/path/to/project-root/scripts/plugins

And maybe could reuse the $_GO_ROOTDIR as _GO_SCRIPTS_DIR is doing it

_GO_ROOTDIR: /absolute/path/to/project-root
_GO_CORE_DIR: $_GO_ROOTDIR/scripts/go-script-bash
_GO_SCRIPTS_DIR: $_GO_ROOTDIR/scripts
_GO_PLUGINS_DIR: $_GO_ROOTDIR/scripts/plugins

Or not doing it at all, but do be consistent:

_GO_ROOTDIR: /absolute/path/to/project-root
_GO_CORE_DIR: /absolute/path/to/project-root/scripts/go-script-bash
_GO_SCRIPTS_DIR: /absolute/path/to/project-root/scripts
_GO_PLUGINS_DIR: /absolute/path/to/project-root/scripts/plugins

Given that the example directory structure is:

project-root/
  go - main ./go script
  lib/ - publicly-exported modules (if the project is a go-bash-script plugin)
  scripts/ (or bin/) - project (or plugin) ./go command scripts
    lib/ - project-specific Bash library modules (see "Modules" section)
    plugins/ - (optional) third-party command scripts (see `./go help plugins`)
      .../
        bin/ - plugin ./go command scripts
        lib/ - publicly-exported Bash library modules (see "Modules" section)
    go-script-bash/
      go-core.bash - top-level functions
      lib/ - publicly-exported Bash library modules (see "Modules" section)
      libexec/ - builtin ./go command scripts
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant